hello全部 我有来自开源项目的代码,即将集成到我的代码中。 现在我在Visual Studio 2008字符集中的代码设置是Unicode。并且外部代码是 多字节字符集。当我在添加新源代码后在我的应用程序中更改字符设置时,我的代码中出现其他错误。
所以从网上读取我想我需要对外部代码进行一些更改以支持unicode。 这里是我的代码:win32 CreateProcess无法将参数2从'char * __ w64'转换为'LPWSTR'错误
string FullPathToExe = c:\\foo\\boo.exe;
vector<char> str2(FullPathToExe.begin(), FullPathToExe.end());
str2.push_back('\0');
if (!CreateProcess(NULL,
&str2[0],
NULL,
NULL,
TRUE,
0,
NULL,
NULL,
&si,
&pi))
and the error is :
: error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'char *__w64 '
to 'LPWSTR'
我不是Win32程序员,这是新的我。
我如何支持使用多字节和Unicode的开发人员?
感谢您的帮助
pszAPI从哪里来?从问题中删除这个,所以你可以重新发布它作为一个新的问题。 – ralphtheninja 2011-05-13 15:27:04