IsWellKnownSid function (securitybaseapi.h)

The IsWellKnownSid function compares a SID to a well-known SID and returns TRUE if they match.

Syntax

BOOL IsWellKnownSid(
  [in] PSID                pSid,
  [in] WELL_KNOWN_SID_TYPE WellKnownSidType
);

Parameters

[in] pSid

A pointer to the SID to test.

[in] WellKnownSidType

Member of the WELL_KNOWN_SID_TYPE enumeration to compare with the SID at pSid.

Return value

Returns TRUE if the SID at pSid matches the well-known SID indicated by WellKnownSidType.

Otherwise, returns FALSE.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header securitybaseapi.h (include Windows.h)
Library Advapi32.lib
DLL Advapi32.dll

See also

CreateWellKnownSid

SID

WELL_KNOWN_SID_TYPE