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
+1
View File
@@ -974,6 +974,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
{
}
CloseHandle(sei.hProcess);
}
else
{
+1
View File
@@ -431,6 +431,7 @@ int WINAPI wWinMain(
DWORD dwExitCode = 0;
GetExitCodeProcess(sei.hProcess, &dwExitCode);
SetLastError(dwExitCode);
CloseHandle(sei.hProcess);
}
}
}
+1
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;
}
}