PsDereferencePrimaryToken function (ntifs.h)

The PsDereferencePrimaryToken routine decrements the reference count of a primary token.

Syntax

void PsDereferencePrimaryToken(
  [in] PACCESS_TOKEN PrimaryToken
);

Parameters

[in] PrimaryToken

Pointer to the primary token whose reference count is to be decremented.

Return value

None

Remarks

If the token's reference count reaches zero, the token is deleted.

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.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL < DISPATCH_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)

See also

PsDereferenceImpersonationToken