Group: Security - Library: advapi32
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.
Obtaining a handle to the desktop associated with the calling thread
Accessing LSA Policy object (Local Security Authority)
Reading security permissions for NTFS files and folders
BOOL IsValidSid(
PSID pSid
);
DECLARE INTEGER IsValidSid IN advapi32;
STRING pSid
pSid [in] Pointer to the SID structure to validate. This parameter cannot be NULL.
If the SID structure is valid, the return value is nonzero.