GetSidLengthRequired function (securitybaseapi.h)
The GetSidLengthRequired function returns the length, in bytes, of the buffer required to store a SID with a specified number of subauthorities.
Syntax
DWORD GetSidLengthRequired(
[in] UCHAR nSubAuthorityCount
);
Parameters
[in] nSubAuthorityCount
Specifies the number of subauthorities to be stored in the SID structure.
Return value
The return value is the length, in bytes, of the buffer required to store the SID structure. This function cannot fail.
Remarks
The SID structure specified in nSubAuthorityCount uses a 32-bit RID value. For applications that require longer RID values, use CreateWellKnownSid and related functions.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2003 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | securitybaseapi.h (include Windows.h) |
Library | Advapi32.lib |
DLL | Advapi32.dll |