EqualSid

The EqualSid function tests two security identifier (SID) values for equality. Two SIDs must match exactly to be considered equal.

BOOL EqualSid(
  PSID pSid1,  // pointer to first SID to compare
  PSID pSid2   // pointer to second SID to compare
);
 

Parameters

pSid1
Pointer to the first SID structure to compare. This structure is assumed to be valid.
pSid2
Pointer to the second SID structure to compare. It also is assumed to be valid.

Return Values

If the SID structures are equal, the return value is nonzero.

If the SID structures are not equal, the return value is zero. To get extended error information, call GetLastError.

If either SID structure is invalid, the return value is undefined.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: Use advapi32.lib.

See Also

Access Control Overview, Access Control Functions, EqualPrefixSid, IsValidSid, SID