EqualSid Function
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 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

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View