mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 00:03:38 +00:00
Use NtQueryInformationThread to implement GetExitCodeThread.
This commit is contained in:
parent
04c1f9f88c
commit
e8b2630620
|
@ -385,16 +385,17 @@ BOOL WINAPI GetExitCodeThread(
|
|||
HANDLE hthread, /* [in] Handle to thread */
|
||||
LPDWORD exitcode) /* [out] Address to receive termination status */
|
||||
{
|
||||
BOOL ret;
|
||||
SERVER_START_REQ( get_thread_info )
|
||||
THREAD_BASIC_INFORMATION info;
|
||||
NTSTATUS status = NtQueryInformationThread( hthread, ThreadBasicInformation,
|
||||
&info, sizeof(info), NULL );
|
||||
|
||||
if (status)
|
||||
{
|
||||
req->handle = hthread;
|
||||
req->tid_in = 0;
|
||||
ret = !wine_server_call_err( req );
|
||||
if (ret && exitcode) *exitcode = reply->exit_code;
|
||||
SetLastError( RtlNtStatusToDosError(status) );
|
||||
return FALSE;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return ret;
|
||||
if (exitcode) *exitcode = info.ExitStatus;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue