1、我定义char a[10];
int i =0;
可以用 _snprintf(a, 10, "%d", i);
但使用RtlStringCchPrintfW(a, 10, "%d", i)时出错
2、我定义BK_CMD_T tAtCmd;
AT_CMGD_SET_CMD_PARA_T reqPara;
typedef struct _BK_CMD_T
{
BK_CMD_PROTOCOL_T cmdProt;
unsigned char TargetModuleID;
unsigned char SourceModuleID;
unsigned short CmdID;
unsigned char CmdType;
unsigned char Reserved[3];
unsigned short ParaLen;
void *Handle;
void *pData;
unsigned char Paras[BK_CMD_PARA_MAX_LEN];
} BK_CMD_T;
typedef struct _AT_CMGD_SET_CMD_PARA_T
{
int index;
int delflag;
} AT_CMGD_SET_CMD_PARA_T;
使用memcpy(tAtCmd.Paras, &reqPara, sizeof(AT_CMGD_SET_CMD_PARA_T))可以
但使用RtlCopyMemory(tAtCmd.Paras, &reqPara, sizeof(AT_CMGD_SET_CMD_PARA_T))时出错