Commit e8b26306 authored by Alexandre Julliard's avatar Alexandre Julliard

Use NtQueryInformationThread to implement GetExitCodeThread.

parent 04c1f9f8
...@@ -385,16 +385,17 @@ BOOL WINAPI GetExitCodeThread( ...@@ -385,16 +385,17 @@ BOOL WINAPI GetExitCodeThread(
HANDLE hthread, /* [in] Handle to thread */ HANDLE hthread, /* [in] Handle to thread */
LPDWORD exitcode) /* [out] Address to receive termination status */ LPDWORD exitcode) /* [out] Address to receive termination status */
{ {
BOOL ret; THREAD_BASIC_INFORMATION info;
SERVER_START_REQ( get_thread_info ) NTSTATUS status = NtQueryInformationThread( hthread, ThreadBasicInformation,
&info, sizeof(info), NULL );
if (status)
{ {
req->handle = hthread; SetLastError( RtlNtStatusToDosError(status) );
req->tid_in = 0; return FALSE;
ret = !wine_server_call_err( req );
if (ret && exitcode) *exitcode = reply->exit_code;
} }
SERVER_END_REQ; if (exitcode) *exitcode = info.ExitStatus;
return ret; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment