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 Structures, prefix the name with the module name and a period.
LSA_UNICODE_STRING (Structures)
.
C# Definition:
[StructLayout(LayoutKind.Sequential)]
struct LSA_UNICODE_STRING
{
public UInt16 Length;
public UInt16 MaximumLength;
public IntPtr Buffer;
}
VB Definition:
Structure LSA_UNICODE_STRING
Structure LSA_UNICODE_STRING
Dim Length As Short
Dim MaximumLength As Short
Dim Buffer As IntPtr
End Structure
End Structure
User-Defined Field Types:
None.
Notes:
None.
Sample Code (C#):
// You should already have the HPolicy and SID ready
IntPtr rightsPtr;
uint countOfRights;
LsaEnumerateAccountRights(HPolicy, SID, out rightsPtr, out countOfRights);
try
{
IntPtr ptr = rightsPtr;
LSA_UNICODE_STRING userRight;
for (int i = 0; i < countOfRights; i++)
{
userRight = (LSA_UNICODE_STRING)Marshal.PtrToStructure(ptr, typeof(LSA_UNICODE_STRING));
String userRightStr = Marshal.PtrToStringAuto(userRight.Buffer);
Console.WriteLine("Another Privilege found: " + userRightStr);
ptr = (IntPtr)((Int32)ptr + Marshal.SizeOf(userRight));
}
}
finally
{
LsaFreeMemory(rightsPtr);
}
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.