如何将char [256]转换为wstring?将BSTR转换为wstring
更新。这里是我当前的代码:
char testDest[256];
char *p= _com_util::ConvertBSTRToString(url->bstrVal);
for (int i = 0; i <= strlen(p); i++)
{
testDest[i] = p[i];
}
// need to convert testDest to wstring to I can pass it to this below function...
writeToFile(testDestwstring);
-1,因为你不应该首先引入不必要的'char []'。 – MSalters 2010-09-28 12:02:57