33,311
社区成员
发帖
与我相关
我的任务
分享
void cnvt(CString in, wchar_t *out)
{
size_t len = in.GetLength();
TCHAR tmp[5] = {0};
TCHAR *endPtr;
TCHAR *p = in.GetBuffer();
int i,j;
for(i = 0,j=0; i < len; i+=4,j++)
{
wcsncpy(tmp,p+i,4);
out[j] = wcstol(tmp,&endPtr,16);
}
in.ReleaseBuffer();
out[j] = '\0';
}