@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Gets the data execution prevention (DEP) and DEP-ATL thunk emulation settings for the specified 32-bit process. !!!!C# Signature: [DllImport("kernel32.dll", SetLastError=true)] static extern IntPtr GetProcessDEPPolicy(IntPtr hProcess, out Policy lpFlags, out bool lpPermanent); !!!!VB Signature: Declare Function GetProcessDEPPolicy Lib "kernel32.dll" (TODO) As TODO !!!!User-Defined Types: None. !!!!Policy: [System.Flags] public enum Policy : uint { DISABLED = 0x0, PROCESS_DEP_ENABLE = 0x00000001, PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION = 0x00000002 } !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: GetProcessDEPPolicy is supported for 32-bit processes only. If this function is called on a 64-bit process, it fails with ERROR_NOT_SUPPORTED. !!!!Tips & Tricks: Please add some! !!!!Sample Code: var result = default(Policy); var per = false; var policy = GetProcessDEPPolicy((IntPtr)(-1), out result, out per); if(policy == default(IntPtr)) { throw new Win32Exception(Marshal.GetLastWin32Error()); }else { Console.WriteLine("Process DEP policy: " + result); Console.WriteLine("Permanent: " + per); } Documentation: GetProcessDEPPolicy@msdn on MSDN
Edit kernel32.GetProce...
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.