Commit e8b26306 authored by Alexandre Julliard's avatar Alexandre Julliard

Use NtQueryInformationThread to implement GetExitCodeThread.

parent 04c1f9f8
......@@ -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;
}
......
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