如何將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