//ModuleKernal.h #ifndef __MODULE_KERNAL_H__ #define __MODULE_KERNAL_H__ #include #define MESSAGE_TYPE_CHANNEL 0 #define MESSAGE_TYPE_SUBJECT 1 //Common Module 利用 CBPublish 來 publish 資訊,參數中的 strData 最後不需要加上 \r\n, //Main Program 內訂 CommonModule 的 Prefix 為 CM,因此外送的資訊的Subject為 Host.WinCom8k.CM typedef int (__stdcall *CBPublish)(int nID, int nType, char *strGroupPath, MessageObject *lpMsgObj); typedef void (__stdcall *CBWriteLog)(int nID, char *strLog); BOOL DoInit(int nID, DWORD dwParam, CBPublish procCBPublish, CBWriteLog procCBWriteLog); BOOL DoStart(); void DoStop(); void DoFinalize(); void DoRefresh(); void DoProcessMsg(char *strTagPath, MessageObject *lpMsgObj); #endif