.
C# Definitions:
struct TOKEN_PRIVILEGES {
public UInt32 PrivilegeCount;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=ANYSIZE_ARRAY)]
public LUID_AND_ATTRIBUTES [] Privileges;
}
Alternate simple structure for single privilege setting:
[StructLayout(LayoutKind.Sequential)]
public struct TOKEN_PRIVILEGES
{
public UInt32 PrivilegeCount;
public LUID Luid;
public UInt32 Attributes;
}
VB Definition:
Structure TOKEN_PRIVILEGES
Public PrivilegeCount As Integer
Public TheLuid As LUID
Public Attributes As Integer
End Structure
User-Defined Field Types:
LUID
LUID_AND_ATTRIBUTES
Notes:
None.
VB.Net Sample Code:
' Token Privilege
Dim tp As New TOKEN_PRIVILEGES
tp.PrivilegeCount = 1
tp.Privilege.Luid = luid_Restore
tp.Privilege.Attributes = SE_PRIVILEGE_ENABLED
Alternative Managed API:
A 64-bit value guaranteed to be unique only on the system on which it was generated... until the system is restarted.
9/20/2009 4:37:01 AM - -66.68.181.45
Represents a locally unique identifier ([LUID]) and its attributes.
3/16/2007 2:17:49 PM - e.semog-207.141.0.26
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.
