wstring strLimitedSheetsTemp = SysAllocString(LimitedSheets);//LimitedSheets is BSTR
char* charVal= new char[strLimitedSheetsTemp.length() + 1];
wsprintfA(charVal, "%S", strLimitedSheetsTemp.c_str());
//free memory
delete [] charVal;
strLimitedSheetsTemp.clear();
No comments:
Post a Comment