char* 转 BSTR

来源:互联网 发布:yum安装文件在哪 编辑:程序博客网 时间:2024/05/23 13:39
#define _AFXDLL#include <iostream>#include <cstring>#include <afx.h>using namespace std;int main(){char *file = "中国";CString cstring = CString(file);BSTR bstr = cstring.AllocSysString();}

原创粉丝点击