@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The SaferCreateLevel function opens a SAFER_LEVEL_HANDLE. !!!!C# Signature: [DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)] public static extern bool SaferCreateLevel(uint dwScopeId, uint dwLevelId, int OpenFlags, out IntPtr pLevelHandle, IntPtr lpReserved); !!!!VB Signature: 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 !!!!User-Defined Types: 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); !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: Don't forget to close the handle using SaferCloseLevel. !!!!Tips & Tricks: Please add some! !!!!Sample Code: Please add some! Documentation: SaferCreateLevel@msdn on MSDN
Edit advapi32.SaferCre...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.