forked from Mirrors/wine-wine
kernel32: TerminateProcess unlike NtTerminateProcess is supposed to fail with process == 0.
parent
521cf664d3
commit
37f7e7ea0c
|
@ -2593,7 +2593,15 @@ DWORD WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
|
|||
*/
|
||||
BOOL WINAPI TerminateProcess( HANDLE handle, DWORD exit_code )
|
||||
{
|
||||
NTSTATUS status = NtTerminateProcess( handle, exit_code );
|
||||
NTSTATUS status;
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
SetLastError( ERROR_INVALID_HANDLE );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
status = NtTerminateProcess( handle, exit_code );
|
||||
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
||||
return !status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue