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 |
); |
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.