SHTestTokenMembership function (shellapi.h)

Uses CheckTokenMembership to test whether the given token is a member of the local group with the specified RID.

Syntax

BOOL SHTestTokenMembership(
  [in, optional] HANDLE hToken,
                 ULONG  ulRID
);

Parameters

[in, optional] hToken

Type: HANDLE

A handle to the token. This value can be NULL.

ulRID

Type: ULONG

The RID of the local group for which membership is tested.

Return value

Type: BOOL

Returns TRUE on success, FALSE on failure.

Remarks

This function wraps CheckTokenMembership and only checks local groups.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shellapi.h
Library Shell32.lib
DLL Shell32.dll (version 6.0 or later)