From fafe735f130700fbb0184d5a9523a51160b2c94d Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 2 Sep 2003 23:33:02 +0000 Subject: [PATCH] Don't call CloseHandle() on the HMODULE returned from GetModuleHandle(). 2003-09-02 Tor Lillqvist * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call CloseHandle() on the HMODULE returned from GetModuleHandle(). Didn't cause any harm, but didn't do anything useful either. When running a GTK+ program under MS's debugger, the CloseHandle() call would cause a "first-chance exception" in ntdll.dll to show up. (The exception is caught appropriately if you let it proceed, but it confuses the person using the debugger). Thanks to Bruce Hochstetler for noticing. --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-4 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ gdk/win32/gdkdisplay-win32.c | 2 -- 6 files changed, 55 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6db564d14c..01087f63cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-09-02 Tor Lillqvist + + * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call + CloseHandle() on the HMODULE returned from GetModuleHandle(). + Didn't cause any harm, but didn't do anything useful either. When + running a GTK+ program under MS's debugger, the CloseHandle() call + would cause a "first-chance exception" in ntdll.dll to show up. + (The exception is caught appropriately if you let it proceed, but + it confuses the person using the debugger). Thanks to Bruce + Hochstetler for noticing. + Tue Sep 2 21:01:19 2003 Kristian Rietveld Merge from stable. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6db564d14c..01087f63cc 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2003-09-02 Tor Lillqvist + + * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call + CloseHandle() on the HMODULE returned from GetModuleHandle(). + Didn't cause any harm, but didn't do anything useful either. When + running a GTK+ program under MS's debugger, the CloseHandle() call + would cause a "first-chance exception" in ntdll.dll to show up. + (The exception is caught appropriately if you let it proceed, but + it confuses the person using the debugger). Thanks to Bruce + Hochstetler for noticing. + Tue Sep 2 21:01:19 2003 Kristian Rietveld Merge from stable. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6db564d14c..01087f63cc 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +2003-09-02 Tor Lillqvist + + * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call + CloseHandle() on the HMODULE returned from GetModuleHandle(). + Didn't cause any harm, but didn't do anything useful either. When + running a GTK+ program under MS's debugger, the CloseHandle() call + would cause a "first-chance exception" in ntdll.dll to show up. + (The exception is caught appropriately if you let it proceed, but + it confuses the person using the debugger). Thanks to Bruce + Hochstetler for noticing. + Tue Sep 2 21:01:19 2003 Kristian Rietveld Merge from stable. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6db564d14c..01087f63cc 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +2003-09-02 Tor Lillqvist + + * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call + CloseHandle() on the HMODULE returned from GetModuleHandle(). + Didn't cause any harm, but didn't do anything useful either. When + running a GTK+ program under MS's debugger, the CloseHandle() call + would cause a "first-chance exception" in ntdll.dll to show up. + (The exception is caught appropriately if you let it proceed, but + it confuses the person using the debugger). Thanks to Bruce + Hochstetler for noticing. + Tue Sep 2 21:01:19 2003 Kristian Rietveld Merge from stable. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6db564d14c..01087f63cc 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +2003-09-02 Tor Lillqvist + + * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call + CloseHandle() on the HMODULE returned from GetModuleHandle(). + Didn't cause any harm, but didn't do anything useful either. When + running a GTK+ program under MS's debugger, the CloseHandle() call + would cause a "first-chance exception" in ntdll.dll to show up. + (The exception is caught appropriately if you let it proceed, but + it confuses the person using the debugger). Thanks to Bruce + Hochstetler for noticing. + Tue Sep 2 21:01:19 2003 Kristian Rietveld Merge from stable. diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 2439f970a9..80441ca35a 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -119,8 +119,6 @@ gdk_display_open (const gchar *display_name) p_EnumDisplayMonitors = (t_EnumDisplayMonitors) GetProcAddress (user32, "EnumDisplayMonitors"); p_GetMonitorInfoA = (t_GetMonitorInfoA) GetProcAddress (user32, "GetMonitorInfoA"); - CloseHandle (user32); - if (p_EnumDisplayMonitors != NULL && p_GetMonitorInfoA != NULL) { gint i, index;