[Winpt-commits] r415 - trunk/Src
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Sat Feb 11 17:51:01 CET 2012
Author: twoaday
Date: 2012-02-11 17:51:01 +0100 (Sat, 11 Feb 2012)
New Revision: 415
Modified:
trunk/Src/ChangeLog
trunk/Src/WinPT.cpp
trunk/Src/wptMainProc.cpp
Log:
2012-02-11 Timo Schulz <twoaday at gmx.net>
* WinPT.cpp (WinMain): Switch to disable hooking.
* wptMainProc.cpp (winpt_main_proc): Handle it here.
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2012-02-11 16:45:17 UTC (rev 414)
+++ trunk/Src/ChangeLog 2012-02-11 16:51:01 UTC (rev 415)
@@ -4,6 +4,8 @@
pair to avoid side-effects.
(paste_window_content): Likewise.
(copy_window_content): Likewise.
+ * WinPT.cpp (WinMain): Switch to disable hooking.
+ * wptMainProc.cpp (winpt_main_proc): Handle it here.
2012-02-06 Timo Schulz <twoaday at gmx.net>
Modified: trunk/Src/WinPT.cpp
===================================================================
--- trunk/Src/WinPT.cpp 2012-02-11 16:45:17 UTC (rev 414)
+++ trunk/Src/WinPT.cpp 2012-02-11 16:51:01 UTC (rev 415)
@@ -44,6 +44,7 @@
HINSTANCE glob_hinst; /* global instance for the dialogs */
HWND glob_hwnd; /* global window handle for the dialogs */
int scard_support = 0;
+int disable_hook = 0;
int debug = 0;
int gpg_read_only = 0;
char gpgver[3];
@@ -419,7 +420,12 @@
PostMessage (hwnd, WM_DESTROY, 0, 0);
}
return 0;
- }
+ }
+
+ /* KLUDGE: test if the hooking is causing problems with some AV programs */
+ if (cmdline && stristr (cmdline, "--disable-hook"))
+ disable_hook = 1;
+
log_debug("check PTD and GPGME version");
get_file_version ("winpt.exe", &ver[0], &ver[1], &ver[2], &ver[3]);
Modified: trunk/Src/wptMainProc.cpp
===================================================================
--- trunk/Src/wptMainProc.cpp 2012-02-11 16:45:17 UTC (rev 414)
+++ trunk/Src/wptMainProc.cpp 2012-02-11 16:51:01 UTC (rev 415)
@@ -48,6 +48,10 @@
#include "wptCardEdit.h"
+/* KLUDGE: for no-hooking */
+extern int disable_hook;
+
+
int update_keycache (HWND hwnd);
/* Command for the Key Manager dialog. (0=no command) */
@@ -333,9 +337,11 @@
if (rc)
msg_box (hwnd, hotkeys_strerror (), winpt_strerror (rc), MB_ERR);
}
- rc = PTD_initialize ();
- if (!rc)
- msg_box (hwnd, _("Could not set current window mode hooks."), _("WinPT Error"), MB_OK);
+ if (!disable_hook) {
+ rc = PTD_initialize ();
+ if (!rc)
+ msg_box (hwnd, _("Could not set current window mode hooks."), _("WinPT Error"), MB_OK);
+ }
mapi_init ();
init_common_controls ();
LoadLibrary ("RichEd32.Dll");
More information about the Winpt-commits
mailing list