[DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
public static extern bool SaferCreateLevel(uint dwScopeId, uint dwLevelId, int OpenFlags, out IntPtr
pLevelHandle, IntPtr lpReserved);
Declare Function SaferCreateLevel Lib "advapi32.dll" (ByVal dwScopeId As Long, ByVal dwLevelId As Long, ByVal OpenFlags As Long, pLevelHandle As Long, ByVal lpReserved As Long) As Long
With these optional Enums:
[Flags]
public enum SaferLevelEnum
{
Disallowed = 0,
Untrusted = 0x1000,
Constrained = 0x10000,
NormalUser = 0x20000,
FullyTrusted = 0x40000
}
[Flags]
public enum SaferScopeEnum
{
Machine = 1,
User = 2
}
You can then declare SaferCreateLevel as:
[DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
public static extern bool SaferCreateLevel(uint dwScopeId, uint dwLevelId, int OpenFlags, out IntPtr
pLevelHandle, IntPtr lpReserved);
Do you know one? Please contribute it!
Don't forget to close the handle using SaferCloseLevel.
Please add some!
Please add some!