CAccessToken::CheckTokenMembership
Call this method to determine if a specified SID is enabled in the CAccessToken object.
bool CheckTokenMembership(
const CSid& rSid,
bool* pbIsMember
) const throw(...);
Parameters
rSid
Reference to a CSid Class object.pbIsMember
Pointer to a variable that receives the results of the check.
Return Value
Returns true on success, false on failure.
Remarks
The CheckTokenMembership method checks for the presence of the SID in the user and group SIDs of the access token. If the SID is present and has the SE_GROUP_ENABLED attribute, pbIsMember is set to true; otherwise, it is set to false.
In debug builds, an assertion error will occur if pbIsMember is not a valid pointer.
Note
The CAccessToken object must be an impersonation token and not a primary token.
Requirements
Header: atlsecurity.h