/*LPWSTR pszCmdLine = StrDup(strRunExe.c_str());
if (pszCmdLine != nullptr)
{
bRet = CommonUtil::CreateProcessWithToken(pszCmdLine);
LocalFree(pszCmdLine);
}*/
char tchar wchar 等为数组类型,转为const char 使用c_str,。data()等
无const 使用打印 StrDup()函数 或者 _stprintf对应TCHAR. printf等.
xstring SOURCE;
TCHAR pszCmdLine[MAX_] = {0};
_stprintf(pszCmdLine, _T("%s"), SOURCE);