EnDecode.h
Upload User: cydong117
Upload Date: 2009-11-10
Package Size: 638k
Code Size: 1k
Development Platform:

Visual C++

  1. #define _DEFBLOCKSIZE 16
  2. #define _DEFBLOCKSIZE 16
  3. #define _FEATURESIZE 6
  4. #define _CHARDESCSIZE 11
  5. #define _FEATURESIZEEX 4
  6. typedef struct tag_TDEFAULTMESSAGE
  7. {
  8. int nRecog;
  9. WORD wIdent;
  10. WORD wParam;
  11. WORD wTag;
  12. WORD wSeries;
  13. } _TDEFAULTMESSAGE, *_LPTDEFAULTMESSAGE;
  14. typedef struct tag_TSHORTMSSEAGE
  15. {
  16. WORD wIdent;
  17. WORD wMsg;
  18. } _TSHORTMSSEAGE, *_LPTSHORTMSSEAGE;
  19. typedef struct tagPACKETMSG
  20. {
  21. _TDEFAULTMESSAGE stDefMsg;
  22. CHAR szEncodeData[MAX_PATH * 4];
  23. }PACKETMSG, *LPPACKETMSG;
  24. typedef struct tag_TMSGHEADER
  25. {
  26. int nCode;
  27. int nSocket;
  28. WORD wUserGateIndex;
  29. WORD wIdent;
  30. WORD wUserListIndex;
  31. WORD wTemp;
  32. int nLength;
  33. } _TMSGHEADER, *_LPTMSGHEADER;
  34. /*typedef struct tagTGateToSvrHeader
  35. {
  36. char szPrefix; // Always is '%'
  37. char szID; // Identifier.
  38. BYTE btGateIndex; // Gate server index.
  39. int nSocket; // Socket(owner of msg) in gate server.
  40. WORD wDataLength; // Length of msg that following header.
  41. } TGateToSvrHeader, *LPTGateToSvrHeader; 
  42. #define GTS_HEADER_SIZE sizeof(TGateToSvrHeader) */
  43. void WINAPI fnMakeDefMessage(_LPTDEFAULTMESSAGE lptdm, WORD wIdent, int nRecog, WORD wParam, WORD wTag, WORD wSeries);
  44. int  WINAPI fnEncode6BitBuf(unsigned char *pszSrc, char *pszDest, int nSrcLen, int nDestLen);
  45. int  WINAPI fnDecode6BitBuf(char *pszSrc, char *pszDest, int nDestLen);
  46. int  WINAPI fnEncodeMessage(_LPTDEFAULTMESSAGE lptdm, char *pszBuf, int nLen);
  47. int  WINAPI fnDecodeMessage(_LPTDEFAULTMESSAGE lptdm, char *pszBuf);