The IsValidSid function validates a SID structure by verifying that the revision number is within a known range and that the number of subauthorities is less than the maximum. A SID is a security identifier.
BOOL IsValidSid(
PSID pSid // address of SID to query
);
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.
If pSid is NULL, the application will fail with an access violation.
Windows NT: Requires version 3.1 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use advapi32.lib.
Access Control Overview, Access Control Functions, GetLengthSid, GetSidIdentifierAuthority, GetSidLengthRequired, GetSidSubAuthority, GetSidSubAuthorityCount, SID