char * 转换到 LPWCSTR

来源:互联网 发布:coc蓝胖升级数据 编辑:程序博客网 时间:2024/05/18 07:53

char * cStr = "test str";

int len = strlen(cStr) +1;

wchar_t * wText = new wchar_t[len];

memset(wText,0,len);

MultiByteToWideChar(CP_ACP,NULL,cStr,-1,wText,len);

 

 

 

///最后别忘记释放内存

delete []wText;

原创粉丝点击