Export (0) Print
Expand All
Expand Minimize

IsValidSid function

The IsValidSid function validates a security identifier (SID) by verifying that the revision number is within a known range, and that the number of subauthorities is less than the maximum.

Syntax


BOOL WINAPI IsValidSid(
  _In_  PSID pSid
);

Parameters

pSid [in]

A pointer to the SID structure to validate. This parameter cannot be NULL.

Return value

If the SID structure is valid, the return value is nonzero.

If the SID structure is not valid, the return value is zero. There is no extended error information for this function; do not call GetLastError.

Remarks

If pSid is NULL, the application will fail with an access violation.

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
GetLengthSid
GetSidIdentifierAuthority
GetSidLengthRequired
GetSidSubAuthority
GetSidSubAuthorityCount
SID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft