PsGetCurrentThread - NtDoc

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

PETHREAD PsGetCurrentThread();

View the official Windows Driver Kit DDI reference
// ntifs.h

PETHREAD PsGetCurrentThread();

View the official Windows Driver Kit DDI reference
// wdm.h

PETHREAD PsGetCurrentThread();

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

PsGetCurrentThread function (ntddk.h)

Description

The PsGetCurrentThread routine identifies the current thread.

Return value

PsGetCurrentThread returns a pointer to the executive thread object that represents the currently executing thread.

Remarks

You can use the ExGetCurrentResourceThread macro to return the thread ID of the current thread.

#define ExGetCurrentResourceThread() ((ULONG_PTR)PsGetCurrentThread())

See also

ExSetResourceOwnerPointerEx

ExReleaseResourceForThreadLite

KeGetCurrentThread

PsCreateSystemThread

PsGetCurrentProcess

PsGetCurrentProcessId

PsIsSystemThread


Windows Driver Kit DDI reference (nf-ntifs-psgetcurrentthread)

PsGetCurrentThread function (ntifs.h)

Description

The PsGetCurrentThread routine identifies the current thread.

Return value

PsGetCurrentThread returns a pointer to the executive thread object that represents the currently executing thread.

Remarks

This macro

See also

KeGetCurrentThread

PsCreateSystemThread

PsGetCurrentProcess

PsGetCurrentProcessId

PsIsSystemThread


Windows Driver Kit DDI reference (nf-wdm-psgetcurrentthread)

PsGetCurrentThread function (wdm.h)

Description

The PsGetCurrentThread routine identifies the current thread.

Return value

PsGetCurrentThread returns a pointer to the executive thread object that represents the currently executing thread.

Remarks

See also

KeGetCurrentThread

PsCreateSystemThread

PsGetCurrentProcess

PsGetCurrentProcessId

PsIsSystemThread