Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
GetProcessDEPPolicy (kernel32)
.
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
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);
}
Gets the data execution prevention (DEP) and DEP-ATL thunk emulation settings for the specified 32-bit process.
3/29/2017 10:16:54 PM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).