https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffae49deaf12bb58771ed…
commit ffae49deaf12bb58771ed8c18c946f623d7e327a
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Fri Aug 24 15:59:57 2018 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Mon Aug 27 19:49:57 2018 +0200
[COMCTL32] Unregister some classes that were registered.
This should help fix some crashes.
---
dll/win32/comctl32/button.c | 4 ++--
dll/win32/comctl32/combo.c | 7 +++++++
dll/win32/comctl32/comctl32.h | 7 ++++++-
dll/win32/comctl32/commctrl.c | 6 ++++++
dll/win32/comctl32/edit.c | 7 +++++++
dll/win32/comctl32/listbox.c | 13 +++++++++++++
dll/win32/comctl32/static.c | 7 +++++++
7 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c
index b6c4f4e654..bc9336d705 100644
--- a/dll/win32/comctl32/button.c
+++ b/dll/win32/comctl32/button.c
@@ -2104,8 +2104,8 @@ void BUTTON_Register(void)
#ifdef __REACTOS__
-void BUTTON_Unregister()
+void BUTTON_Unregister(void)
{
UnregisterClassW(WC_BUTTONW, NULL);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/dll/win32/comctl32/combo.c b/dll/win32/comctl32/combo.c
index 712e27276a..ee374f4537 100644
--- a/dll/win32/comctl32/combo.c
+++ b/dll/win32/comctl32/combo.c
@@ -2158,3 +2158,10 @@ void COMBO_Register(void)
wndClass.lpszClassName = WC_COMBOBOXW;
RegisterClassW(&wndClass);
}
+
+#ifdef __REACTOS__
+void COMBO_Unregister(void)
+{
+ UnregisterClassW(WC_COMBOBOXW, NULL);
+}
+#endif
diff --git a/dll/win32/comctl32/comctl32.h b/dll/win32/comctl32/comctl32.h
index 2ced440b75..c529a96bb1 100644
--- a/dll/win32/comctl32/comctl32.h
+++ b/dll/win32/comctl32/comctl32.h
@@ -270,7 +270,12 @@ extern void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN;
extern void UPDOWN_Register(void) DECLSPEC_HIDDEN;
extern void UPDOWN_Unregister(void) DECLSPEC_HIDDEN;
#ifdef __REACTOS__
-extern void BUTTON_Unregister();
+extern void BUTTON_Unregister(void) DECLSPEC_HIDDEN;
+extern void COMBO_Unregister(void) DECLSPEC_HIDDEN;
+extern void COMBOLBOX_Unregister(void) DECLSPEC_HIDDEN;
+extern void EDIT_Unregister(void) DECLSPEC_HIDDEN;
+extern void LISTBOX_Unregister(void) DECLSPEC_HIDDEN;
+extern void STATIC_Unregister(void) DECLSPEC_HIDDEN;
extern void TOOLBARv6_Register(void) DECLSPEC_HIDDEN;
extern void TOOLBARv6_Unregister(void) DECLSPEC_HIDDEN;
#endif /* __REACTOS__ */
diff --git a/dll/win32/comctl32/commctrl.c b/dll/win32/comctl32/commctrl.c
index 6eedf01810..d4cb73ae76 100644
--- a/dll/win32/comctl32/commctrl.c
+++ b/dll/win32/comctl32/commctrl.c
@@ -231,6 +231,12 @@ static void UnregisterControls(BOOL bV6)
else
{
BUTTON_Unregister();
+ COMBO_Unregister ();
+ COMBOLBOX_Unregister ();
+ EDIT_Unregister ();
+ LISTBOX_Unregister ();
+ STATIC_Unregister ();
+
TOOLBARv6_Unregister ();
}
diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c
index dde7d3e4c5..e2f47d008e 100644
--- a/dll/win32/comctl32/edit.c
+++ b/dll/win32/comctl32/edit.c
@@ -5039,3 +5039,10 @@ void EDIT_Register(void)
wndClass.lpszClassName = WC_EDITW;
RegisterClassW(&wndClass);
}
+
+#ifdef __REACTOS__
+void EDIT_Unregister(void)
+{
+ UnregisterClassW(WC_EDITW, NULL);
+}
+#endif
diff --git a/dll/win32/comctl32/listbox.c b/dll/win32/comctl32/listbox.c
index 7857aa8174..897f2dc2c6 100644
--- a/dll/win32/comctl32/listbox.c
+++ b/dll/win32/comctl32/listbox.c
@@ -3081,3 +3081,16 @@ void COMBOLBOX_Register(void)
wndClass.lpszClassName = combolboxW;
RegisterClassW(&wndClass);
}
+
+#ifdef __REACTOS__
+void LISTBOX_Unregister(void)
+{
+ UnregisterClassW(WC_LISTBOXW, NULL);
+}
+
+void COMBOLBOX_Unregister(void)
+{
+ static const WCHAR combolboxW[] =
{'C','o','m','b','o','L','B','o','x',0};
+ UnregisterClassW(combolboxW, NULL);
+}
+#endif
diff --git a/dll/win32/comctl32/static.c b/dll/win32/comctl32/static.c
index d9e2fe30dc..f136f2cc79 100644
--- a/dll/win32/comctl32/static.c
+++ b/dll/win32/comctl32/static.c
@@ -791,3 +791,10 @@ void STATIC_Register(void)
wndClass.lpszClassName = WC_STATICW;
RegisterClassW(&wndClass);
}
+
+#ifdef __REACTOS__
+void STATIC_Unregister(void)
+{
+ UnregisterClassW(WC_STATICW, NULL);
+}
+#endif