自己项目中用到的串口通讯DLL库源码。
/////////////////////////////////////////////////////////////////////////////
//Export Functions
BOOL PS_CommTaskInit();
BOOL PS_CommTaskDeInit();
void PS_SendMessagePacket(char* szSendMsg,int nLen);
void PS_SendFilePacket(char* szFileName,int nLen);
BOOL PS_FetchNextRecvMessage(char* szRecvBuff,int &nLen;);
void PS_LogMessage(char* szShowMsg);
//Don't Start Thread,Driect Communicate With Com Port,Please Use These Functions
//不启动线程,直接与串口进行通信,请调用以下的函数
BOOL PS_CommInit();
BOOL PS_SendMessageToComm(char* szSendMsg,int nSize,char *szRecvBuff);
//Not Export Functions
void LoadCommTaskIni();
DWORD WINAPI HandleMainTaskEvent(LPVOID lpvThreadParm);
int HandleCommTaskEvent();
BOOL AddCommTaskToQueue(int nSeqNum,char *szSendBuff,int nLen,BOOL bSendFile=FALSE);
void RecvRequestPacket(int nRecvPacketType);
BOOL CheckRecvPacket(char *szRecvBuff,int nRecvLen);
void PacketMsg(char* szMsg, char * szBuff,int &nSize;);
void SendPOL();
int RecvString(char *szBuff);
2022-01-20 22:01:38
2.89MB
COM
DLL
1