Funzione PsGetCurrentThread (ntddk.h)

La routine PsGetCurrentThread identifica il thread corrente.

Sintassi

PETHREAD PsGetCurrentThread();

Valore restituito

PsGetCurrentThread restituisce un puntatore all'oggetto thread esecutivo che rappresenta il thread attualmente in esecuzione.

Commenti

È possibile utilizzare la macro ExGetCurrentResourceThread per restituire l'ID thread del thread corrente.

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

Requisiti

Requisito Valore
Client minimo supportato Disponibile a partire da Windows 2000.
Piattaforma di destinazione Universale
Intestazione ntddk.h (include Wdm.h, Ntddk.h, Ntifs.h)
Libreria NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Qualsiasi livello

Vedi anche

ExSetResourceOwnerPointerEx

ExReleaseResourceForThreadLite

KeGetCurrentThread

PsCreateSystemThread

PsGetCurrentProcess

PsGetCurrentProcessId

PsIsSystemThread