7#include "mdwclient_global.h"
12#define ldfa GetProcAddress
46 typedef bool (*pCOM_SetMessageThreadID)(uint32_t iThreadID);
133 typedef int (*
pCOM_ConnectTo)(
char cProtocol,
const char* cIPAddress, uint16_t wPort,
char cLinkMode,
int& iTxmmKey,
int iTimeOut,
const char* cTokenID);
154 typedef int (*
pCOM_Request)(
int iConnectNo,
int iReqNo,
char* cDataBuf, uint32_t iBufLen,
bool bNewRequst);
168 typedef int (*
pCOM_RouteRequest)(
int iConnectNo, uint8_t uRouteTo,
int iReqNo,
char* cDataBuf, uint32_t iBufLen,
bool bNewRequst);
190 typedef int (*
pCOM_Answer)(
int iConnectNo, uint8_t* uResult,
char* cDataBuf, uint32_t* iBufLen,
bool bNotWait);
207 typedef int (*
pCOM_GetRequest)(
int iConnectNo,
int* iReqNo,
char* cDataBuf, uint32_t iBufLen);
251 typedef int (*
pCOM_RegisterRDMS)(
int iConnectNo,
const char* cClientID, uint16_t wPort,
bool bLogOut,
bool bPMPMode);
345 typedef bool (*
pCOM_GetField)(
char* des,
int len,
const char* buf,
int pos,
char cSprt);
355 typedef bool (*
pCOM_GetFileMD5)(
const char* filename, int64_t& iFileSize,
char* pBuf);
386 typedef bool (*
pSKT_ListenComm)(
const char* cIPAddress,
int iPort, uint8_t uEncryptMode,
int iTimeOut,
int hRcvMsgWnd,
387 bool bWriteLog,
const char* cTokenID);
427 typedef int (*
pSKT_SendData)(
int hSocket,
const char* cDataBuf,
int iBufLen, uint8_t uPackType,
bool bHaveNext,
bool bSuccess);
440 typedef int (*
pSKT_RecvData)(
int hSocket, uint8_t* cDataBuf,
int* iBufLen,
int* iRequestNo, uint8_t * uPackType);
443 class MDWC_COMPLILE CMidLinkDLL
448 HINSTANCE hndMid =
nullptr;
455 bool m_bLoadMidLinkOk;
457 std::string m_sFileName;
459 char m_sErrorMsg[1025];
462 CMidLinkDLL(
const CMidLinkDLL&) =
delete;
464 CMidLinkDLL& operator=(
const CMidLinkDLL&) =
delete;
468 void SetErrorMessage(
int iErrorCode);
483 pCOM_SetMessageThreadID COM_SetMessageThreadID;
527 bool InitCommLib(
int hWritePipe, std::string sClientIni =
"");
543 std::string GetErrorMessage(
int iErrorNo,
int iConnectNo = 0);
550 bool GetCommLinkCount(
int& iMaxCount,
int& iFreeCount);
555 std::vector<Logon_UserInfo> GetClientLoginInfo();
563 std::string GetMachineID();
571 std::string Encrypt10Char(std::string sSou,
int iPinKey);
579 std::string Decrypt10Char(std::string sSou,
int PinKey);
587 std::string Encrypt(std::string sSou,
int iPinKey);
595 std::string Decrypt(std::string sSou,
int PinKey);
602 bool IsLoad() {
return m_bLoadMidLinkOk; };
608 std::string GetVersion();
614 void SetDefaultRoute(uint8_t uRouteID);
pCOM_GetLocalIntenetAddress COM_GetLocalIntenetAddress
定义 MidLinkDLL.h:489
pCOM_GetCharSet COM_GetCharSet
定义 MidLinkDLL.h:488
pCOM_Request COM_Request
定义 MidLinkDLL.h:500
pSKT_Listen SKT_Listen
定义 MidLinkDLL.h:510
pCOM_decrypt2 COM_decrypt2
定义 MidLinkDLL.h:478
pCOM_RegisterRDMS COM_RegisterRDMS
定义 MidLinkDLL.h:492
pCOM_SetCharSet COM_SetCharSet
定义 MidLinkDLL.h:487
pSKT_CloseSocket SKT_CloseSocket
定义 MidLinkDLL.h:516
bool InitCommLib(int hWritePipe, std::string sClientIni="")
定义 MidLinkDLL.cpp:39
pCOM_UnRegisterUser COM_UnRegisterUser
定义 MidLinkDLL.h:493
pCOM_InitCommAuth COM_InitCommAuth
定义 MidLinkDLL.h:471
pCOM_RegisterUser COM_RegisterUser
定义 MidLinkDLL.h:491
pCOM_decrypt COM_decrypt
定义 MidLinkDLL.h:476
pSKT_RecvData SKT_RecvData
定义 MidLinkDLL.h:518
pSKT_UnPMPComm SKT_UnPMPComm
定义 MidLinkDLL.h:514
bool IsLoad()
定义 MidLinkDLL.h:602
pCOM_GetConnectStatus COM_GetConnectStatus
定义 MidLinkDLL.h:504
pCOM_DisConnect COM_DisConnect
定义 MidLinkDLL.h:481
pCOM_GetShowedMessage COM_GetShowedMessage
定义 MidLinkDLL.h:495
pCOM_encrypt COM_encrypt
定义 MidLinkDLL.h:475
pCOM_GetField COM_GetField
定义 MidLinkDLL.h:506
pCOM_Connect COM_Connect
定义 MidLinkDLL.h:498
pCOM_GetClientLoginInfo COM_GetClientLoginInfo
定义 MidLinkDLL.h:497
pSKT_PMPComm SKT_PMPComm
定义 MidLinkDLL.h:512
pCOM_CloseComm COM_CloseComm
定义 MidLinkDLL.h:480
pCOM_InitCommFile COM_InitCommFile
定义 MidLinkDLL.h:472
pCOM_GetServerInfo COM_GetServerInfo
定义 MidLinkDLL.h:505
pCOM_RouteRequest COM_RouteRequest
定义 MidLinkDLL.h:501
pCOM_GetFileMD5 COM_GetFileMD5
定义 MidLinkDLL.h:507
pSKT_SendData SKT_SendData
定义 MidLinkDLL.h:517
pCOM_SetDefaultRoute COM_SetDefaultRoute
定义 MidLinkDLL.h:508
pCOM_Answer COM_Answer
定义 MidLinkDLL.h:503
pCOM_ConnectTo COM_ConnectTo
定义 MidLinkDLL.h:499
pCOM_encrypt2 COM_encrypt2
定义 MidLinkDLL.h:477
pSKT_ListenComm SKT_ListenComm
定义 MidLinkDLL.h:511
pCOM_SendMessage COM_SendMessage
定义 MidLinkDLL.h:494
pCOM_GetMachineID COM_GetMachineID
定义 MidLinkDLL.h:474
std::string GetErrorMessage()
定义 MidLinkDLL.h:535
void CloseCommLib()
定义 MidLinkDLL.cpp:65
pCOM_CancelRequest COM_CancelRequest
定义 MidLinkDLL.h:502
pCOM_InitComm COM_InitComm
定义 MidLinkDLL.h:470
pCOM_GetVersion COM_GetVersion
定义 MidLinkDLL.h:485
pSKT_GetSocketInfo SKT_GetSocketInfo
定义 MidLinkDLL.h:515
int GetAppMainWindowHandle()
定义 MidLinkDLL.h:532
pCOM_MaxLinkCount COM_MaxLinkCount
定义 MidLinkDLL.h:473
pCOM_DisabledTimeOut COM_DisabledTimeOut
定义 MidLinkDLL.h:490
pCOM_ReceiveImage COM_ReceiveImage
定义 MidLinkDLL.h:496
pSKT_UnListenComm SKT_UnListenComm
定义 MidLinkDLL.h:513
void(*) pSKT_UnListenComm(const char *cIPAddress, int iPort)
定义 MidLinkDLL.h:395
int(*) pCOM_GetConnectStatus(int iConnectNo, const char *cConnectAddr)
定义 MidLinkDLL.h:213
bool(*) pCOM_decrypt2(char *Source, int PinKey, char *Out)
定义 MidLinkDLL.h:333
bool(*) pCOM_InitCommFile(int hWritePipe, const char *cConfigFile)
定义 MidLinkDLL.h:77
void(*) pSKT_CloseSocket(int hSocket, bool bSendMsg)
定义 MidLinkDLL.h:412
int(*) pCOM_GetServerInfo(int iConnectNo, char *cServerFunction)
定义 MidLinkDLL.h:222
int(*) pCOM_DisabledTimeOut(int iConnectNo, bool bDisabled)
定义 MidLinkDLL.h:299
int(*) pCOM_GetShowedMessage(NET_SHOW_MESSAGE *cMsg)
定义 MidLinkDLL.h:273
int(*) pCOM_ReceiveImage(bool bEnabled, const char *cDeviceLists)
定义 MidLinkDLL.h:282
int(*) pCOM_SendMessage(char cType, const char *cMsg)
定义 MidLinkDLL.h:266
bool(*) pSKT_PMPComm(int hRcvMsgWnd, bool bWriteLog)
定义 MidLinkDLL.h:372
bool(*) pCOM_GetFileMD5(const char *filename, int64_t &iFileSize, char *pBuf)
定义 MidLinkDLL.h:355
int(*) pCOM_Answer(int iConnectNo, uint8_t *uResult, char *cDataBuf, uint32_t *iBufLen, bool bNotWait)
定义 MidLinkDLL.h:190
int(*) pSKT_RecvData(int hSocket, uint8_t *cDataBuf, int *iBufLen, int *iRequestNo, uint8_t *uPackType)
定义 MidLinkDLL.h:440
void(*) pSKT_UnPMPComm()
定义 MidLinkDLL.h:398
void(*) pCOM_decrypt(char *Source, int PinKey, char *Out)
定义 MidLinkDLL.h:324
int(*) pCOM_SetDefaultRoute(int iConnectNo, uint8_t uRouteTo)
定义 MidLinkDLL.h:197
int(*) pCOM_UnRegisterUser()
定义 MidLinkDLL.h:258
int(*) pSKT_GetSocketInfo(int hSocket, CLIENT_SOCKET_INFO *pSocketInfo)
定义 MidLinkDLL.h:405
int(*) pCOM_Request(int iConnectNo, int iReqNo, char *cDataBuf, uint32_t iBufLen, bool bNewRequst)
定义 MidLinkDLL.h:154
bool(*) pCOM_SetCharSet(int iCharSetID)
定义 MidLinkDLL.h:88
int(*) pCOM_Connect(int &iTxmmKey)
定义 MidLinkDLL.h:119
int(*) pCOM_RouteRequest(int iConnectNo, uint8_t uRouteTo, int iReqNo, char *cDataBuf, uint32_t iBufLen, bool bNewRequst)
定义 MidLinkDLL.h:168
bool(*) pCOM_GetField(char *des, int len, const char *buf, int pos, char cSprt)
定义 MidLinkDLL.h:345
void(*) pCOM_encrypt(char *Source, int PinKey, char *Out)
定义 MidLinkDLL.h:307
bool(*) pCOM_InitComm(int hWritePipe)
定义 MidLinkDLL.h:61
int(*) pCOM_RegisterRDMS(int iConnectNo, const char *cClientID, uint16_t wPort, bool bLogOut, bool bPMPMode)
定义 MidLinkDLL.h:251
bool(*) pCOM_InitCommAuth(int hWritePipe, bool bWorkstationAuth)
定义 MidLinkDLL.h:69
int(*) pCOM_GetCharSet(int iConnectNo)
定义 MidLinkDLL.h:96
void(*) pCOM_DisConnect(int iConnectNo)
定义 MidLinkDLL.h:140
int(*) pCOM_CancelRequest(int iConnectNo, bool bBreakConnect)
定义 MidLinkDLL.h:177
int(*) pSKT_SendData(int hSocket, const char *cDataBuf, int iBufLen, uint8_t uPackType, bool bHaveNext, bool bSuccess)
定义 MidLinkDLL.h:427
int(*) pCOM_ConnectTo(char cProtocol, const char *cIPAddress, uint16_t wPort, char cLinkMode, int &iTxmmKey, int iTimeOut, const char *cTokenID)
定义 MidLinkDLL.h:133
bool(*) pCOM_encrypt2(char *Source, int PinKey, char *Out)
定义 MidLinkDLL.h:316
void(*) pCOM_CloseComm()
定义 MidLinkDLL.h:80
int(*) pCOM_MaxLinkCount(bool bOnlyFree)
定义 MidLinkDLL.h:104
int(*) pCOM_RegisterUser(const char *cCode, const char *cName)
定义 MidLinkDLL.h:239
void(*) pCOM_GetMachineID(const char *cValue, uint32_t dwKey)
定义 MidLinkDLL.h:230
bool(*) pSKT_ListenComm(const char *cIPAddress, int iPort, uint8_t uEncryptMode, int iTimeOut, int hRcvMsgWnd, bool bWriteLog, const char *cTokenID)
定义 MidLinkDLL.h:386
bool(*) pCOM_GetVersion(char *cVerInfo, int iVerInfoSize)
定义 MidLinkDLL.h:54
int(*) pCOM_GetRequest(int iConnectNo, int *iReqNo, char *cDataBuf, uint32_t iBufLen)
定义 MidLinkDLL.h:207
bool(*) pSKT_Listen(int hRcvMsgWnd, bool bWriteLog)
定义 MidLinkDLL.h:364
int(*) pCOM_GetClientLoginInfo(LOGIN_CLIENT *sLoginInfos, int iLen)
定义 MidLinkDLL.h:112
int(*) pCOM_GetLocalIntenetAddress(int iConnectNo, const char *cAddress)
定义 MidLinkDLL.h:290