PsReferencePrimaryToken - NtDoc

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

PACCESS_TOKEN PsReferencePrimaryToken(
  [in, out] PEPROCESS Process
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

PsReferencePrimaryToken function

Description

The PsReferencePrimaryToken routine increments the reference count of the primary token for the specified process.

Parameters

Process [in, out]

Pointer to the process whose primary token's reference count is to be incremented.

Return value

PsReferencePrimaryToken returns a pointer to the primary token for the given process.

Remarks

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:

For more information about security and access control, see Windows security model for driver developers and the documentation on these topics in the Windows SDK.

See also

ObDereferenceObject

PsDereferencePrimaryToken

PsReferenceImpersonationToken

SeQueryInformationToken