SeQuerySubjectContextToken macro (ntifs.h)

The SeQuerySubjectContextToken macro retrieves the access token for a security subject context.

Syntax

PACESS_TOKEN
SeQuerySubjectContextToken(SubjectContext);

Parameters

[in] SubjectContext

Pointer to a SECURITY_SUBJECT_CONTEXT structure containing the subject context to query.

Return value

SeQuerySubjectContextToken returns the effective token from SubjectContext. The effective token is the client token, if present; otherwise it is the primary (process) token.

Remarks

The access token pointer returned by SeQuerySubjectContextToken can be passed to SeQueryInformationToken.

SeQuerySubjectContextToken does not affect the lock status or access token of the subject context.

For more information about security and access control, see the documentation on these topics in the Microsoft Windows SDK.

Requirements

   
Minimum supported client This routine is available on Microsoft Windows 2000 and later.
Target Platform Desktop
Header ntifs.h (include Ntifs.h)
IRQL PASSIVE_LEVEL

See also

PsDereferenceImpersonationToken

PsDereferencePrimaryToken

SECURITY_SUBJECT_CONTEXT

SeQueryAuthenticationIdToken

SeQueryInformationToken

SeTokenIsAdmin

SeTokenIsRestricted