Authorization Functions


EqualSid Function

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

Syntax

C++
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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.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

Tags :


Page view tracker