Platform SDK: Access Control

GetSidLengthRequired

The GetSidLengthRequired function returns the length, in bytes, of the buffer required to store a SID with a specified number of subauthorities.

DWORD GetSidLengthRequired(
  UCHAR nSubAuthorityCount   // count of subauthorities
);

Parameters

nSubAuthorityCount
[in] Specifies the number of subauthorities to be stored in the SID structure.

Return Values

The return value is the length, in bytes, of the buffer required to store the SID structure. This function cannot fail.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Advapi32.lib.

See Also

Access Control Overview, Access Control Functions, AllocateAndInitializeSid, GetLengthSid, GetSidIdentifierAuthority, GetSidSubAuthority, GetSidSubAuthorityCount, InitializeSid, IsValidSid, SID