aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-08-17 16:47:04 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-08-17 16:47:04 +0000
commite5504262f912e2e17e2a0951fb98a0e852e39777 (patch)
tree6e91ea1fd61fd085e372dcc6f92e4f69708378c5 /wsutil
parent6e8b9a1e6bb8bc5636f7c8b7d7832bd367c214ec (diff)
From Gisle Vanem: Make sure our SetProcessDEPPolicyHandler typedef
matches the documentation. I also verified that DEP is still enabled on Win32 using Process Explorer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38583 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/privileges.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wsutil/privileges.c b/wsutil/privileges.c
index 7e51101c5d..12282837e1 100644
--- a/wsutil/privileges.c
+++ b/wsutil/privileges.c
@@ -48,7 +48,7 @@ void
init_process_policies(void)
{
HMODULE kernel32Handle;
- typedef BOOL (*SetProcessDEPPolicyHandler)(DWORD);
+ typedef BOOL (WINAPI *SetProcessDEPPolicyHandler)(DWORD);
SetProcessDEPPolicyHandler PSetProcessDEPPolicy;
#ifndef PROCESS_DEP_ENABLE
@@ -70,7 +70,8 @@ init_process_policies(void)
*/
kernel32Handle = GetModuleHandle(_T("kernel32.dll"));
if (kernel32Handle != NULL) {
- if (PSetProcessDEPPolicy = (SetProcessDEPPolicyHandler) GetProcAddress(kernel32Handle, "SetProcessDEPPolicy")) {
+ PSetProcessDEPPolicy = (SetProcessDEPPolicyHandler) GetProcAddress(kernel32Handle, "SetProcessDEPPolicy");
+ if (PSetProcessDEPPolicy) {
PSetProcessDEPPolicy(PROCESS_DEP_ENABLE);
}
}