//mtoolkit.h //基本的处理函数,不引用其它任何头文件 typedef unsigned char BYTE; extern "C" { BYTE __stdcall hextobcd(BYTE *buf); void __stdcall bcdtohex(BYTE b,BYTE *buf); bool __stdcall hextostring(unsigned char *inbuf,int inlen,unsigned char * outbuf); bool __stdcall stringtohex(unsigned char *inbuf,int inlen,unsigned char * outbuf); bool __stdcall ishex(BYTE *buf,int bl); bool __stdcall isbcd(BYTE *buf,int bl); bool __stdcall encodebcd(BYTE *buf,long val,int bl); long __stdcall decodebcd(BYTE *buf,int bl); BYTE __stdcall checksum(BYT E *buf,int bl); BYTE __stdcall checkxor(BYTE *buf,int bl); void __stdcall strrevert(BYTE *buf,int bl); }