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 advapi32, prefix the name with the module name and a period.
public static extern uint LsaEnumerateAccountRights(
[MarshalAs(UnmanagedType.LPArray)] byte AccountSid,
out IntPtr UserRights,
out uint CountOfRights
Declare Function LsaEnumerateAccountRights Lib "advapi32.dll" (TODO) As TODO
The reason behind using byte for a sid is a mystery to me. Has anyone documented this? I've just copied the techniques from other functions here and it seems to work.
Similarly - the sample code below works, but why can't you just use an array of LSA_UNICODE_STRING ???
(Answer: Nobody knows why, but the runtime seems to screw it up)
Tips & Tricks:
Please add some!
Sample Code (C#):
// You should already have the HPolicy and SID ready
LsaEnumerateAccountRights(HPolicy, SID, out rightsPtr, out countOfRights);
IntPtr ptr = rightsPtr;
for (Int32 i = 0; i < countOfRights; i++)
LSA_UNICODE_STRING_withPointer structure = new LSA_UNICODE_STRING_withPointer();