备用笔记...
#include "stdafx.h"
#include "stdio.h"
#include "windows.h"
int _tmain(int argc, _TCHAR* argv[])
{
const char g_GlobleFlag[] = "XXX";//全局FLAG,无论命令还是数据包都加这个 XOX(3)|TOKEN(1)|DataLen(4)|DataStream(...)
char buff[32] = {0};
strcat(buff,g_GlobleFlag);
buff[3] = 97;
*(int*)(buff+4) = 12345678;
int nTest1 = *(int*)(buff+4);
printf("nTest1:[%d]\n",nTest1);
return 0;
}