RtlCheckTokenMembership - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_8)

// rev
/**
 * The RtlCheckTokenMembership routine determines whether a specified SID is enabled in the given token.
 *
 * \param TokenHandle An optional handle to an impersonation token; if NULL, the token of the current thread is used.
 * \param SidToCheck A pointer to the SID whose membership is checked.
 * \param IsMember A pointer to a variable that receives whether the SID is enabled in the token.
 * \return NTSTATUS Successful or errant status.
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlCheckTokenMembership(
    _In_opt_ HANDLE TokenHandle,
    _In_ PSID SidToCheck,
    _Out_ PBOOLEAN IsMember
    );

#endif
#endif

View code on GitHub

NtDoc

Determines if a token can pass access checks against the specified SID.

Parameters

Pseudo-handles

This function supports the following pseudo-handle values:

Implementation details

This function calls RtlCheckTokenMembershipEx with flags set to 0.

Required OS version

This function was introduced in Windows 8.

Related Win32 API

See also