Export (0) Print
Expand All
Expand Minimize

GetProcessDEPPolicy function

Gets the data execution prevention (DEP) and DEP-ATL thunk emulation settings for the specified 32-bit process.

Windows XP with SP3:  Gets the DEP and DEP-ATL thunk emulation settings for the current process.

Syntax


BOOL WINAPI GetProcessDEPPolicy(
  _In_   HANDLE hProcess,
  _Out_  LPDWORD lpFlags,
  _Out_  PBOOL lpPermanent
);

Parameters

hProcess [in]

A handle to the process. PROCESS_QUERY_INFORMATION privilege is required to get the DEP policy of a process.

Windows XP with SP3:  The hProcess parameter is ignored.

lpFlags [out]

A DWORD that receives one or more of the following flags.

ValueMeaning
0

DEP is disabled for the specified process.

PROCESS_DEP_ENABLE
0x00000001

DEP is enabled for the specified process.

PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION
0x00000002

DEP-ATL thunk emulation is disabled for the specified process. For information about DEP-ATL thunk emulation, see SetProcessDEPPolicy.

 

lpPermanent [out]

TRUE if DEP is enabled or disabled permanently for the specified process; otherwise FALSE. If lpPermanent is TRUE, the current DEP setting persists for the life of the process and cannot be changed by calling SetProcessDEPPolicy.

Return value

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. To retrieve error values defined for this function, call GetLastError.

Remarks

GetProcessDEPPolicy is supported for 32-bit processes only. If this function is called on a 64-bit process, it fails with ERROR_NOT_SUPPORTED.

To compile an application that calls this function, define _WIN32_WINNT as 0x0600 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported client

Windows Vista with SP1, Windows XP with SP3 [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Data Execution Prevention
GetSystemDEPPolicy
SetProcessDEPPolicy

 

 

Community Additions

ADD
Show:
© 2014 Microsoft