#ifndef PACKET_HEAD_FILE
#define PACKET_HEAD_FILE#include<afxwin.h>
#include<afx.h>//存储长度
#define CountStringBufferA(String) ((UINT)((lstrlenA(String)+1)*sizeof(CHAR)))
#define CountStringBufferW(String) ((UINT)((lstrlenW(String)+1)*sizeof(WCHAR)))class CSendPacketHelper
{//函数定义
public:
//构造函数
inline CSendPacketHelper(VOID * pcbBuffer, WORD wMaxBytes);public:
//插入字符
bool AddPacket(LPCSTR pszString, WORD wDataType);
//插入字符
bool AddPacket(LPCWSTR pszString, WORD wDataType);
//插入数据
bool AddPacket(VOID * pData, WORD wDataSize, WORD wDataType);
};////////////////////////////////////////////////////////////////////////////////////构造函数
CSendPacketHelper::CSendPacketHelper(VOID * pcbBuffer, WORD wMaxBytes)
{
//设置变量
return;
}//插入字符
bool CSendPacketHelper::AddPacket(LPCSTR pszString, WORD wDataType)
{return AddPacket((VOID *)pszString,CountStringBufferA(pszString),wDataType);
}//插入字符
bool CSendPacketHelper::AddPacket(LPCWSTR pszString, DWORD wDataType)
{return AddPacket((VOID *)pszString,CountStringBufferW(pszString),wDataType);
}//插入数据
bool CSendPacketHelper::AddPacket(VOID * pData, WORD wDataSize, WORD wDataType)
{
return true;
}//////////////////////////////////////////////////////////////////////////////////#pragma pack()#endif