struct TOKEN_PRIVILEGES {
public int PrivilegeCount;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=ANYSIZE_ARRAY)]
public LUID_AND_ATTRIBUTES [] Privileges;
}
struct TOKEN_PRIVILEGES {
public long PrivilegeCount;
private LUID_AND_ATTRIBUTES[] _privileges;
public LUID_AND_ATTRIBUTES[] Privileges
{
get
{
if ( this._privileges == null )
this._privileges = new LUID_AND_ATTRIBUTES[2];
return this._privileges;
}
set {this._privileges = value;}
}
}
Structure TOKEN_PRIVILEGES
Public TODO
End Structure
If you only need one privilege, you can define the last field as a single LUID_AND_ATTRIBUTES field instead of an array.