1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00

Closed handles when ShellExecuteExW with SEE_MASK_NOCLOSEPROCESS

This commit is contained in:
Valentin Radu 2021-11-15 05:54:54 +02:00
parent 8cba312707
commit abf0d38cb4
3 changed files with 3 additions and 0 deletions

View File

@ -974,6 +974,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
{
}
CloseHandle(sei.hProcess);
}
else
{

View File

@ -431,6 +431,7 @@ int WINAPI wWinMain(
DWORD dwExitCode = 0;
GetExitCodeProcess(sei.hProcess, &dwExitCode);
SetLastError(dwExitCode);
CloseHandle(sei.hProcess);
}
}
}

View File

@ -61,6 +61,7 @@ int main(int argc, char** argv)
WaitForSingleObject(ShExecInfo.hProcess, INFINITE);
DWORD dwExitCode = 0;
GetExitCodeProcess(ShExecInfo.hProcess, &dwExitCode);
CloseHandle(ShExecInfo.hProcess);
return dwExitCode;
}
}