Skip to content

Commit

Permalink
Fix COREDLL CreateProcessW (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNNX authored Apr 14, 2024
1 parent 22efc0b commit 99318b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion COREDLL/winbase_wcecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,13 @@ BOOL WINAPI CreateProcessW_WCECL(
LPSTARTUPINFO psiStartInfo,
LPPROCESS_INFORMATION pProcInfo)
{
std::wstring commandLine = std::wstring(pszImageName) + L" " + std::wstring(pszCmdLine);
wchar_t* commandLineCString = new wchar_t[commandLine.length() + 1];
wcscpy(commandLineCString, commandLine.c_str());

auto result = CreateProcessW(
pszImageName,
(LPWSTR)pszCmdLine,
commandLineCString,
psaProcess,
psaThread,
fInheritHandles,
Expand Down

0 comments on commit 99318b7

Please sign in to comment.