Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _PIPESDLL_H
- #define _PIPESDLL_H
- #ifdef _DEBUG
- #pragma comment (lib, "\\PROMOS16\\lib\\pmospipeD.lib")
- #else
- #pragma comment (lib, "\\PROMOS16\\lib\\pmospipe.lib")
- #endif
- #define NO_PIPE_EXISTS -2
- #define TOO_MANY_PIPES -3
- #define PIPE_EXISTS -4
- #define NO_POINT_EXISTS -5 // equivalent zu DMS: POINT_NOT_EXIST=2
- #define NO_TYPE_MATCH -6
- #define PROJ_DIR "Proj"
- // Filter für Remote-GE und WebServer: "System:Node:NODExy:ABC.." -> "System:Node:<akt.Adr>:ABC.."
- void SetLanguageIdxStr(TCHAR* sPCName, TCHAR* sLanguage, int nLanguage); // set language for all connections from this PCName
- int _stdcall ReceiveBlocking(SOCKET sock, char *buffer, int len);
- int _stdcall SendBlocking(SOCKET sock, const char FAR *buffer, int len);
- int _stdcall SendNonBlocking(clientEx *cl, const char FAR *buffer, int len);
- // Callback access (non-blocking) to DMS ///////////////////////////////////////////////////////
- // ZS 19.11.2010: neu _cdecl anstatt _stdcall: wegen C# Anbindung
- int /*_cdecl*/ _stdcall ConnectDMSidle(TCHAR *lpszPipename,client *cl,int (*fun_ptr)(comm *msg),int (*idle_ptr)(comm *msg));
- int /*_cdecl*/ _stdcall ConnectDMSidleEx(TCHAR *lpszPipename,clientEx *cl,int (*fun_ptr)(comm *msg),int (*idle_ptr)(comm *msg));
- int /*_cdecl*/ _stdcall ConnectDMS(TCHAR *lpszPipename,client *cl,int (*fun_ptr)(comm *msg));
- int /*_cdecl*/ _stdcall ConnectDMSEx(TCHAR *lpszPipename,clientEx *cl,int (*fun_ptr)(comm *msg));
- int /*_cdecl*/ _stdcall DisconnectDMS(client* cl);
- int /*_cdecl*/ _stdcall DisconnectDMSEx(clientEx* cl);
- int _stdcall SendPipe(comm *msg,client *cl); // Old function non blocking
- int _stdcall SendPipeEx(comm *msg,clientEx *cl); // New function non blocking
- int _stdcall SendPipeBulkEx(comm *msg, clientEx *cl, int nBulkLen);
- int _stdcall SendPrgName(client* dms, TCHAR* name);
- int _stdcall SendPrgNameEx(clientEx* dms, TCHAR* name);
- int _stdcall RegisterDMS(client* dms, char* name, int obj_id);
- int _stdcall RegisterDMSEx(clientEx* dms, char* name, int obj_id);
- int _stdcall RegRightsDMS(clientEx* dms, char* name, int obj_id);
- int _stdcall UnregisterDMS(client* dms, char* name, int obj_id); // Old function non blocking
- int _stdcall UnregisterDMSEx(clientEx* dms, char* name, int obj_id);// New function non blocking
- int _stdcall SendBitDMS(client* dms, TCHAR* name, tBIT wert);
- int _stdcall SendBitDMSEx(clientEx* dms, TCHAR* name, tBIT wert);
- int _stdcall SendBysDMS(client* dms, TCHAR* name, tBYS wert);
- int _stdcall SendBysDMSEx(clientEx* dms, TCHAR* name, tBYS wert);
- int _stdcall SendByuDMS(client* dms, TCHAR* name, tBYU wert);
- int _stdcall SendByuDMSEx(clientEx* dms, TCHAR* name, tBYU wert);
- int _stdcall SendWosDMS(client* dms, TCHAR* name, tWOS wert);
- int _stdcall SendWosDMSEx(clientEx* dms, TCHAR* name, tWOS wert);
- int _stdcall SendWouDMS(client* dms, TCHAR* name, tWOU wert);
- int _stdcall SendWouDMSEx(clientEx* dms, TCHAR* name, tWOU wert);
- int _stdcall SendDwsDMS(client* dms, TCHAR* name, tDWS wert);
- int _stdcall SendDwsDMSEx(clientEx* dms, TCHAR* name, tDWS wert);
- int _stdcall SendDwuDMS(client* dms, TCHAR* name, tDWU wert);
- int _stdcall SendDwuDMSEx(clientEx* dms, TCHAR* name, tDWU wert);
- int _stdcall SendFltDMS(client* dms, TCHAR* name, tFLT wert);
- int _stdcall SendFltDMSEx(clientEx* dms, TCHAR* name, tFLT wert);
- int _stdcall SendStrDMS(client* dms, TCHAR* name, tSTR* wert);
- int _stdcall SendStrDMSEx(clientEx* dms, TCHAR* name, tSTR* wert);
- // return last error of previous operation (=GetLastError() or =0 if OK)
- int _stdcall DMS_Error(void);
- // Direct access (blocking) to DMS ///////////////////////////////////////////////////////
- int _stdcall DMS_Connect(TCHAR *lpszPipename, HANDLE& pipe);
- int _stdcall DMS_ConnectEx(TCHAR *lpszPipename, int& idx);
- int _stdcall DMS_ConnEx(TCHAR *lpszPipename); // ---> für TestComplete special only
- int _stdcall DMS_Close(HANDLE pipe);
- int _stdcall DMS_CloseEx(int idx);
- int _stdcall CDMS_Close(CDMSData *pDMS);
- HANDLE _stdcall DMS_GetPipe(int idx);
- int _stdcall DMS_Send(HANDLE pipe, comm *msg);
- int _stdcall DMS_SendEx(int idx, comm *msg);
- int _stdcall CDMS_Send(CDMSData *pDMS, comm *msg);
- int _stdcall DMS_SendPrgName(HANDLE pipe, TCHAR* name);
- int _stdcall DMS_SendPrgNameEx(int idx, TCHAR* name);
- int _stdcall CDMS_SendPrgName(CDMSData *pDMS, TCHAR* name);
- int _stdcall DMS_Create(HANDLE pipe, TCHAR *name, char type);
- int _stdcall DMS_CreateEx(int idx, TCHAR *name, char type);
- int _stdcall CDMS_Create(CDMSData *pDMS, TCHAR *name, char type);
- int _stdcall DMS_CreateRemanent(HANDLE pipe, TCHAR *name, char type);
- int _stdcall DMS_CreateRemanentEx(int idx, TCHAR *name, char type);
- int _stdcall CDMS_CreateRemanent(CDMSData *pDMS, TCHAR *name, char type);
- int _stdcall DMS_CreatePoint(HANDLE pipe, TCHAR *name, char type, char rights);
- int _stdcall DMS_CreatePointEx(int idx, TCHAR *name, char type, char rights);
- int _stdcall CDMS_CreatePoint(CDMSData *pDMS, TCHAR *name, char type, char rights);
- int _stdcall DMS_Delete(HANDLE pipe, TCHAR *name);
- int _stdcall DMS_DeleteEx(int idx, TCHAR *name);
- int _stdcall CDMS_Delete(CDMSData *pDMS, TCHAR *name);
- int _stdcall DMS_Rename(HANDLE pipe, TCHAR *nameOld, TCHAR *nameNew);
- int _stdcall DMS_RenameEx(int idx, TCHAR *nameOld, TCHAR *nameNew);
- int _stdcall CDMS_Rename(CDMSData *pDMS, TCHAR *nameOld, TCHAR *nameNew);
- int _stdcall DMS_SendCode(HANDLE pipe, int code);
- int _stdcall DMS_SendCodeEx(int idx, int code);
- int _stdcall CDMS_SendCode(CDMSData *pDMS, int code);
- int _stdcall DMS_SaveTree(HANDLE pipe, TCHAR* Filename, TCHAR* Vorlage);
- int _stdcall DMS_SaveTreeEx(int idx, TCHAR* Filename, TCHAR* Vorlage);
- int _stdcall CDMS_SaveTree(CDMSData *pDMS, TCHAR* Filename, TCHAR* Vorlage);
- int _stdcall DMS_InsertBMO(int idx, TCHAR* sBmo, TCHAR* sDms);
- // ret on ERROR: -1(general), -2(NO_PIPE_EXISTS), -5(NO_POINT_EXISTS),
- // or else on OK: ID_NONE=0, ID_BIT=1..ID_STR=9..
- int _stdcall DMS_ReadType(HANDLE pipe, TCHAR *name);
- int _stdcall DMS_ReadTypeEx(int idx, TCHAR *name);
- int _stdcall CDMS_ReadType(CDMSData *pDMS, TCHAR *name);
- // Für PmosPipe DMS_Write.. Funktionen, welche eingebaute Filterfunktion für Remote-GE und WebServer haben:
- // der DMS-Name wird dann transformiert: "System:Node:NODExy:ABC.." -> "System:Node:<ClAdr>:ABC.."
- BOOL _stdcall DMS_SetClientAdr(int idx, TCHAR *ClAdr);
- int _stdcall DMS_WriteBIT(HANDLE pipe, TCHAR *name, tBIT bwert);
- int _stdcall DMS_WriteBITEx(int idx, TCHAR *name, tBIT bwert);
- int _stdcall CDMS_WriteBIT(CDMSData *pDMS, TCHAR *name, tBIT bwert);
- int _stdcall DMS_WriteBYS(HANDLE pipe, TCHAR *name, tBYS wert);
- int _stdcall DMS_WriteBYSEx(int idx, TCHAR *name, tBYS wert);
- int _stdcall CDMS_WriteBYS(CDMSData *pDMS, TCHAR *name, tBYS wert);
- int _stdcall DMS_WriteBYU(HANDLE pipe, TCHAR *name, tBYU wert);
- int _stdcall DMS_WriteBYUEx(int idx, TCHAR *name, tBYU wert);
- int _stdcall CDMS_WriteBYU(CDMSData *pDMS, TCHAR *name, tBYU wert);
- int _stdcall DMS_WriteWOS(HANDLE pipe, TCHAR *name, tWOS wert);
- int _stdcall DMS_WriteWOSEx(int idx, TCHAR *name, tWOS wert);
- int _stdcall CDMS_WriteWOS(CDMSData *pDMS, TCHAR *name, tWOS wert);
- int _stdcall DMS_WriteWOU(HANDLE pipe, TCHAR *name, tWOU wert);
- int _stdcall DMS_WriteWOUEx(int idx, TCHAR *name, tWOU wert);
- int _stdcall CDMS_WriteWOU(CDMSData *pDMS, TCHAR *name, tWOU wert);
- int _stdcall DMS_WriteDWS(HANDLE pipe, TCHAR *name, tDWS wert);
- int _stdcall DMS_WriteDWSEx(int idx, TCHAR *name, tDWS wert);
- int _stdcall CDMS_WriteDWS(CDMSData *pDMS, TCHAR *name, tDWS wert);
- int _stdcall DMS_WriteDWU(HANDLE pipe, TCHAR *name, tDWU wert);
- int _stdcall DMS_WriteDWUEx(int idx, TCHAR *name, tDWU wert);
- int _stdcall CDMS_WriteDWU(CDMSData *pDMS, TCHAR *name, tDWU wert);
- int _stdcall DMS_WriteFLT(HANDLE pipe, TCHAR *name, tFLT wert);
- int _stdcall DMS_WriteFLTEx(int idx, TCHAR *name, tFLT wert);
- int _stdcall CDMS_WriteFLT(CDMSData *pDMS, TCHAR *name, tFLT wert);
- int _stdcall DMS_WriteSTR(HANDLE pipe, TCHAR *name, tSTR *wert);
- int _stdcall DMS_WriteSTREx(int idx, TCHAR *name, tSTR *wert);
- int _stdcall CDMS_WriteSTR(CDMSData *pDMS, TCHAR *name, tSTR *wert);
- // all Reads(): OK: return 0
- // ERR: return <>0: NO_PIPE_EXISTS=-2, POINT_NOT_EXIST=2, INVALID_MSG=1 etc.
- int _stdcall DMS_ReadFLT (HANDLE pipe, TCHAR *name, tFLT& wert);
- int _stdcall DMS_ReadFLTEx (int idx, TCHAR *name, tFLT& wert);
- int _stdcall CDMS_ReadFLT (CDMSData *pDMS, TCHAR *name, tFLT& wert);
- int _stdcall DMS_ReadBIT (HANDLE pipe, TCHAR *name, tBIT& zustand);
- int _stdcall DMS_ReadBITEx (int idx, TCHAR *name, tBIT& zustand);
- int _stdcall CDMS_ReadBIT (CDMSData *pDMS, TCHAR *name, tBIT& zustand);
- tBIT _stdcall DMS_RdBITEx(int idx, TCHAR *name);
- int _stdcall DMS_ReadBYS (HANDLE pipe, TCHAR *name, tBYS& zustand);
- int _stdcall DMS_ReadBYSEx (int idx, TCHAR *name, tBYS& zustand);
- int _stdcall CDMS_ReadBYS (CDMSData *pDMS, TCHAR *name, tBYS& zustand);
- int _stdcall DMS_ReadBYU (HANDLE pipe, TCHAR *name, tBYU& zustand);
- int _stdcall DMS_ReadBYUEx (int idx, TCHAR *name, tBYU& zustand);
- int _stdcall CDMS_ReadBYU (CDMSData *pDMS, TCHAR *name, tBYU& zustand);
- int _stdcall DMS_ReadWOU (HANDLE pipe, TCHAR *name, tWOU& wert);
- int _stdcall DMS_ReadWOUEx (int idx, TCHAR *name, tWOU& wert);
- int _stdcall CDMS_ReadWOU (CDMSData *pDMS, TCHAR *name, tWOU& wert);
- tWOU _stdcall DMS_RdWOUEx (int idx, TCHAR *name);
- int _stdcall DMS_ReadWOS (HANDLE pipe, TCHAR *name, tWOS& wert);
- int _stdcall DMS_ReadWOSEx (int idx, TCHAR *name, tWOS& wert);
- int _stdcall CDMS_ReadWOS (CDMSData *pDMS, TCHAR *name, tWOS& wert);
- tWOS _stdcall DMS_RdWOSEx (int idx, TCHAR *name);
- int _stdcall DMS_ReadDWU (HANDLE pipe, TCHAR *name, tDWU& wert);
- int _stdcall DMS_ReadDWUEx (int idx, TCHAR *name, tDWU& wert);
- int _stdcall CDMS_ReadDWU (CDMSData *pDMS, TCHAR *name, tDWU& wert);
- tDWU _stdcall DMS_RdDWUEx (int idx, TCHAR *name);
- int _stdcall DMS_ReadDWS (HANDLE pipe, TCHAR *name, tDWS& wert);
- int _stdcall DMS_ReadDWSEx (int idx, TCHAR *name, tDWS& wert);
- int _stdcall CDMS_ReadDWS (CDMSData *pDMS, TCHAR *name, tDWS& wert);
- tDWS _stdcall DMS_RdDWSEx(int idx, TCHAR *name);
- int _stdcall DMS_ReadSTR (HANDLE pipe, TCHAR *name, tSTR* cwert);
- int _stdcall DMS_ReadSTREx (int idx, TCHAR *name, tSTR* cwert);
- int _stdcall CDMS_ReadSTR(CDMSData *pDMS, TCHAR *name, tSTR* wert);
- TCHAR* _stdcall DMS_RdSTREx(int idx, TCHAR *name);
- char _stdcall DMS_GetRights(HANDLE pipe, TCHAR *Name);
- char _stdcall DMS_GetRightsEx(int idx, TCHAR *Name);
- char _stdcall CDMS_GetRights(CDMSData *pDMS, TCHAR *Name);
- char _stdcall DMS_SetRights(HANDLE pipe, TCHAR *Name, char rights);
- char _stdcall DMS_SetRightsEx(int idx, TCHAR *Name, char rights);
- char _stdcall CDMS_SetRights(CDMSData *pDMS, TCHAR *Name, char rights);
- int _stdcall DMS_FindNames(HANDLE pipe, TCHAR *Name);
- int _stdcall DMS_FindNamesEx(int idx, TCHAR *Name);
- int _stdcall CDMS_FindNames(CDMSData *pDMS, TCHAR *Name);
- TCHAR* _stdcall DMS_Find(int nummer, int& typ);
- TCHAR* _stdcall DMS_FindNext(int& typ);
- TCHAR* _stdcall DMS_FindVal(int nummer, int& typ, value_type* value);
- TCHAR* _stdcall DMS_FindNextVal(int& typ, value_type* value);
- int _stdcall DMS_FindInt(int nummer);
- float _stdcall DMS_FindFlt(int nummer);
- TCHAR* _stdcall DMS_FindStr(int nummer);
- void _stdcall DMS_FindMessageFilter(TCHAR* filter);
- int _stdcall DMS_FindMessage(HANDLE pipe, TCHAR *Name);
- int _stdcall DMS_FindMessageEx(int idx, TCHAR *Name);
- int _stdcall CDMS_FindMessage(CDMSData *pDMS, TCHAR *Name);
- TCHAR* _stdcall DMS_FindNextMessage(Message* msg);
- void _stdcall DMS_ResetMessage(int pos);
- int _stdcall DMS_FindValMessage(HANDLE pipe, TCHAR *Name);
- int _stdcall DMS_FindValMessageEx(int idx, TCHAR *Name);
- int _stdcall CDMS_FindValMessage(CDMSData *pDMS, TCHAR *Name);
- TCHAR* _stdcall DMS_FindNextValMessage(Message* msg);
- void _stdcall DMS_ResetValMessage(int pos);
- TCHAR* _stdcall DMS_GetSPS(HANDLE pipe, TCHAR *name);
- TCHAR* _stdcall DMS_GetSPSEx(int idx, TCHAR *name);
- TCHAR* _stdcall CDMS_GetSPS(CDMSData *pDMS, TCHAR *name);
- int _stdcall DMS_GetNames(HANDLE pipe, TCHAR *name);
- int _stdcall DMS_GetNamesEx(int idx, TCHAR *name);
- int _stdcall CDMS_GetNames(CDMSData *pDMS, TCHAR *name);
- TCHAR* _stdcall DMS_GetNextName(HANDLE pipe, int& sons);
- TCHAR* _stdcall DMS_GetNextNameEx(int& sons);
- int _stdcall DMS_Login(HANDLE pipe, TCHAR* host, TCHAR *name, tSTR* passwort);
- int _stdcall DMS_LoginEx(int idx, TCHAR* host, TCHAR *name, tSTR* passwort);
- int _stdcall CDMS_Login(CDMSData *pDMS, TCHAR* host, TCHAR *name, tSTR* passwort);
- UINT _stdcall DMS_ReadUser(HANDLE pipe, TCHAR* User, TCHAR* Comment);
- UINT _stdcall DMS_ReadUserEx(int idx, TCHAR* User, TCHAR* Comment);
- UINT _stdcall CDMS_ReadUser(CDMSData *pDMS, TCHAR* User, TCHAR* Comment);
- UINT _stdcall DMS_ReadUserRights(int idx, TCHAR* User, TCHAR* Comment);
- int _stdcall DMS_FindAddendumEx(int idx, TCHAR *DMSName, TCHAR* Addendum);
- int _stdcall DMS_FindAddendum(HANDLE pipe, TCHAR *DMSName, TCHAR* Addendum);
- int _stdcall CDMS_FindAddendum(CDMSData *pDMS, TCHAR *DMSName, TCHAR* Addendum);
- TCHAR *ftoa(double wert, int ks = 2);
- void __stdcall SetProjectDir(TCHAR *path);
- int __stdcall ChangeDir(int where, BOOL ShowError = TRUE);
- BOOL sendToPort(TCHAR* IPAdress, int port, TCHAR* sMsg, TCHAR* errStr, int &errNr, HANDLE Stop_SockThread);
- // Dateidefinitionen
- //#define INI_FILE "promos.ini"
- #define CFG_FILE "promos.cfg"
- #define START_FILE ".\\start.def"
- #define STOP_FILE ".\\stop.def"
- #define CFG_DIR ".\\cfg\\"
- #define SCR_DIR ".\\scr\\"
- #define MAC_DIR ".\\mac\\"
- #define BMP_DIR ".\\bmp\\"
- #define LIC_DIR ".\\lic\\"
- #define DRV_DIR ".\\drv\\"
- #define DAT_DIR ".\\dat\\"
- #define BIN_DIR ".\\bin\\"
- #define LOG_DIR ".\\log\\"
- #define RTF_DIR ".\\rtf\\"
- #define WWW_DIR ".\\www\\"
- #define IMG_DIR ".\\www\\img\\"
- #define LIB_DIR ".\\www\\lib\\"
- #define PPC_DIR "\\ppc\\"
- #define PRJDIR 0
- #define CFGDIR 1
- #define SCRDIR 2
- #define MACDIR 3
- #define BMPDIR 4
- #define LICDIR 5
- #define DRVDIR 6
- #define DATDIR 7
- #define LOGDIR 8
- #define RTFDIR 9
- #define WWWDIR 10
- #endif // _PIPESDLL_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement