getsidlengthrequired (advapi32)
Last changed: anonymous

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

C# Signature:

[DllImport("advapi32.dll", SetLastError=true)]
static extern TODO GetSidLengthRequired(TODO);

VB Signature:

Declare Function GetSidLengthRequired Lib "advapi32.dll" (ByVal nSubAuthorityCount As Byte) As Integer

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Dim pSID As IntPtr = Runtime.InteropServices.Marshal.AllocHGlobal(GetSidLengthRequired(iSubAuthorityCount))

Alternative Managed API:

Do you know one? Please contribute it!

Documentation