[ROSAUTOTEST] Revert 9ff3adb. This fixes MSVC build.

This reverts commit 9ff3adb7d7.
This commit is contained in:
Victor Perevertkin 2020-04-09 03:04:44 +03:00
parent 0903c645a2
commit a12d029ec0
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
5 changed files with 83 additions and 20 deletions

View file

@ -18,11 +18,11 @@
*/
CProcess::CProcess(const wstring& CommandLine, LPSTARTUPINFOW StartupInfo)
{
unique_ptr<WCHAR[]> CommandLinePtr(new WCHAR[CommandLine.size() + 1]);
auto_array_ptr<WCHAR> CommandLinePtr(new WCHAR[CommandLine.size() + 1]);
wcscpy(CommandLinePtr.get(), CommandLine.c_str());
wcscpy(CommandLinePtr, CommandLine.c_str());
if(!CreateProcessW(NULL, CommandLinePtr.get(), NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, StartupInfo, &m_ProcessInfo))
if(!CreateProcessW(NULL, CommandLinePtr, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, StartupInfo, &m_ProcessInfo))
TESTEXCEPTION("CreateProcessW failed\n");
}