Skip to content

Commit 99318b7

Browse files
authored
Fix COREDLL CreateProcessW (#30)
1 parent 22efc0b commit 99318b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

COREDLL/winbase_wcecl.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,13 @@ BOOL WINAPI CreateProcessW_WCECL(
171171
LPSTARTUPINFO psiStartInfo,
172172
LPPROCESS_INFORMATION pProcInfo)
173173
{
174+
std::wstring commandLine = std::wstring(pszImageName) + L" " + std::wstring(pszCmdLine);
175+
wchar_t* commandLineCString = new wchar_t[commandLine.length() + 1];
176+
wcscpy(commandLineCString, commandLine.c_str());
177+
174178
auto result = CreateProcessW(
175179
pszImageName,
176-
(LPWSTR)pszCmdLine,
180+
commandLineCString,
177181
psaProcess,
178182
psaThread,
179183
fInheritHandles,

0 commit comments

Comments
 (0)