Export (0) Print
Expand All
Expand Minimize

EqualSid function

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 XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Access Control Overview
Basic Access Control Functions
EqualPrefixSid
IsValidSid
SID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft