diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-07-05 18:15:41 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-07-06 01:19:21 +0200 |
commit | 724043be0b9ed68382c49c54b4750ddeaebe81c4 (patch) | |
tree | f93ab6d2b1597b9fd2c3c354f0c730b805cc3c57 /src/Mount/Hotkeys.c | |
parent | c3b77fba25539c433c882d980169f2c68329e996 (diff) | |
download | VeraCrypt-724043be0b9ed68382c49c54b4750ddeaebe81c4.tar.gz VeraCrypt-724043be0b9ed68382c49c54b4750ddeaebe81c4.zip |
Windows: Display source location of errors in order to help diagnose issues reported by users
Diffstat (limited to 'src/Mount/Hotkeys.c')
-rw-r--r-- | src/Mount/Hotkeys.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Mount/Hotkeys.c b/src/Mount/Hotkeys.c index 0848155e..7840a6c7 100644 --- a/src/Mount/Hotkeys.c +++ b/src/Mount/Hotkeys.c @@ -15,6 +15,10 @@ #include <Strsafe.h>
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
#define MAX_KEY_COMB_NAME_LEN 260
TCHOTKEY Hotkeys [NBR_HOTKEYS];
@@ -422,13 +426,13 @@ BOOL CALLBACK HotkeysDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar if (!bOwnActiveShortcut
&& !RegisterHotKey (hwndDlg, nSelectedHotkeyId, modifiers, currentVKeyCode))
{
- handleWin32Error(hwndDlg);
+ handleWin32Error(hwndDlg, SRC_POS);
return 1;
}
else
{
if (!bOwnActiveShortcut && !UnregisterHotKey (hwndDlg, nSelectedHotkeyId))
- handleWin32Error(hwndDlg);
+ handleWin32Error(hwndDlg, SRC_POS);
tmpHotkeys[nSelectedHotkeyId].vKeyCode = currentVKeyCode;
tmpHotkeys[nSelectedHotkeyId].vKeyModifiers = modifiers;
|