Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than ntdll, prefix the name with the module name and a period.
public SID_IDENTIFIER_AUTHORITY(byte[] value)
{
if (value.Length != 6)
throw new ArgumentOutOfRangeException("value", "Value must be an array of 6 bytes.");
this.Value = value;
}
}
[StructLayout(LayoutKind.Sequential)]
struct SID
{
public byte Revision;
public byte SubAuthorityCount;
public SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
public UInt32[] SubAuthority;
public SID(int subAuthorityCount)
{
this.Revision = 0;
this.SubAuthorityCount = 0;
this.IdentifierAuthority = default(SID_IDENTIFIER_AUTHORITY);
this.SubAuthority = new UInt32[subAuthorityCount];
}
}
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
Tested on Win8.1 x64 by @gsuberland, but not thoroughly.
Tips & Tricks:
Please add some!
Sample Code:
// just using a null identifier here
SID_IDENTIFIER_AUTHORITY id = new SID_IDENTIFIER_AUTHORITY(new byte[] { 0, 0, 0, 0, 0, 0 });
// new SID with an allocated SubAuthority count of 1
SID sid = new SID(1);
// make the call, passing the correct SubAuthority count
var status = RtlInitializeSid(ref sid, ref id, (byte)sid.SubAuthority.Length);
if (status < 0)
Console.WriteLine("Failed.");
else
Console.WriteLine("Success.");
The RtlInitializeSid routine initializes a security identifier (SID) structure.
6/9/2014 3:27:54 PM - -82.12.213.153
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).