mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
kernel32: Implement GetThreadId.
This commit is contained in:
parent
93d87ca37f
commit
8296548bb5
@ -629,6 +629,7 @@
|
||||
@ stdcall GetTempPathA(long ptr)
|
||||
@ stdcall GetTempPathW(long ptr)
|
||||
@ stdcall GetThreadContext(long ptr)
|
||||
@ stdcall GetThreadId(ptr)
|
||||
# @ stub GetThreadIOPendingFlag
|
||||
@ stdcall GetThreadLocale()
|
||||
@ stdcall GetThreadPriority(long)
|
||||
|
@ -518,6 +518,36 @@ BOOL WINAPI GetThreadTimes(
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* GetThreadId [KERNEL32.@]
|
||||
*
|
||||
* Retrieve the identifier of a thread.
|
||||
*
|
||||
* PARAMS
|
||||
* Thread [I] The thread to retrive the identifier of.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Identifier of the target thread.
|
||||
* Failure: 0
|
||||
*/
|
||||
DWORD WINAPI GetThreadId(HANDLE Thread)
|
||||
{
|
||||
THREAD_BASIC_INFORMATION tbi;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE("(%p)\n", Thread);
|
||||
|
||||
status = NtQueryInformationThread(Thread, ThreadBasicInformation, &tbi,
|
||||
sizeof(tbi), NULL);
|
||||
if (status)
|
||||
{
|
||||
SetLastError( RtlNtStatusToDosError(status) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
return HandleToULong(tbi.ClientId.UniqueThread);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* VWin32_BoostThreadGroup [KERNEL.535]
|
||||
|
@ -1682,6 +1682,7 @@ WINBASEAPI UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
|
||||
WINBASEAPI DWORD WINAPI GetTempPathA(DWORD,LPSTR);
|
||||
WINBASEAPI DWORD WINAPI GetTempPathW(DWORD,LPWSTR);
|
||||
#define GetTempPath WINELIB_NAME_AW(GetTempPath)
|
||||
WINBASEAPI DWORD WINAPI GetThreadId(HANDLE);
|
||||
WINBASEAPI DWORD WINAPI GetTickCount(void);
|
||||
WINBASEAPI ULONGLONG WINAPI GetTickCount64(void);
|
||||
WINBASEAPI DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
|
||||
|
Loading…
Reference in New Issue
Block a user