The PsReferencePrimaryToken routine increments the reference count of the primary token for the specified process.
PACCESS_TOKEN PsReferencePrimaryToken( PEPROCESS Process );
Pointer to the process whose primary token's reference count is to be incremented.
PsReferencePrimaryToken returns a pointer to the primary token for the given process.
This routine is available starting with Microsoft Windows 2000.
PsReferencePrimaryToken increments the reference count of the returned primary token. Thus for every successful call to PsReferencePrimaryToken, the primary token's reference count must be decremented by calling one of the following functions:
- ObDereferenceObject, for Windows 2000
- PsDereferencePrimaryToken, for Microsoft Windows XP and later.
|Header||ntifs.h (include FltKernel.h, Ntifs.h)|
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.