I discovered that the function definition of `SetProcessDEPPolicy` (in `WinBase.h`) is included only if `_WIN32_WINNT >= 0x601`. Why MingW32 sets `_WIN32_WINNT = 0x400` for Windows 7 to exclude the definition? I checked the `kernel32.dll` of Windows 7), and it contains `SetProcessDEPPolicy` function all right.