PsGetThreadId - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntddk.h

HANDLE PsGetThreadId(
  [in] PETHREAD Thread
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddk-psgetthreadid)

Description

This routine returns the unique identifier (ID) of a given thread.

Parameters

Thread [in]

A pointer to an executive thread object structure (ETHREAD).

Return value

Returns a HANDLE that is the unique ID of the caller-supplied thread.

Remarks

A driver might call PsGetThreadId for several reasons:

Thread ID is not unique for a boot session. After a thread has terminated its ID may be reused.

See also