GetLengthSid

The GetLengthSid function returns the length, in bytes, of a valid SID structure. A SID is a security identifier.

DWORD GetLengthSid(
  PSID pSid   // address of SID to query
);
 

Parameters

pSid
Pointer to the SID structure whose length is returned. The structure is assumed to be valid.

Return Values

If the SID structure is valid, the return value is the length, in bytes, of the SID structure.

If the SID structure is not valid, the return value is undefined. Before calling GetLengthSid, pass the SID to the IsValidSid function to verify that it is valid.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: Use advapi32.lib.

See Also

Access Control Overview, Access Control Functions, GetSidLengthRequired, GetSidSubAuthorityCount, IsValidSid, SID