The EqualSid function tests two security identifier (SID) values for equality. Two SIDs must match exactly to be considered equal.
Syntax
BOOL WINAPI EqualSid(
__in PSID pSid1,
__in PSID pSid2
);
Parameters
- pSid1 [in]
-
A pointer to the first
SID structure to compare. This structure is assumed to be valid.
- pSid2 [in]
-
A pointer to the second SID structure to compare. This structure is assumed to be valid.
Return Value
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 not valid, the return value is undefined.
Examples
For an example that uses this function, see Searching for a SID in an Access Token.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | Winbase.h (include Windows.h) |
| Library | Advapi32.lib |
| DLL | Advapi32.dll |
See Also
- Access Control Overview
- Basic Access Control Functions
- EqualPrefixSid
- IsValidSid
- SID
Send comments about this topic to Microsoft
Build date: 9/11/2009