Click to Rate and Give Feedback
MSDN
MSDN Library
Security
Authorization
 EqualSid Function

  Switch on low bandwidth view
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: 6/26/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker