Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/apartment.c | 2 +- dlls/combase/combase.c | 1 + dlls/combase/combase.spec | 1 - dlls/combase/combase_private.h | 1 + dlls/ole32/compobj.c | 1 - dlls/ole32/compobj_private.h | 1 - 6 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/combase/apartment.c b/dlls/combase/apartment.c index 356935ae26b..12637c8acdb 100644 --- a/dlls/combase/apartment.c +++ b/dlls/combase/apartment.c @@ -1271,7 +1271,7 @@ HWND WINAPI apartment_getwindow(const struct apartment *apt) return apt->win; }
-void WINAPI apartment_global_cleanup(void) +void apartment_global_cleanup(void) { if (apt_win_class) UnregisterClassW((const WCHAR *)MAKEINTATOM(apt_win_class), hProxyDll); diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index 6d058ea6fa5..da8e97df935 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -2952,6 +2952,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) break; case DLL_PROCESS_DETACH: if (reserved) break; + apartment_global_cleanup(); DeleteCriticalSection(®istered_classes_cs); break; } diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 401979119b4..a888e6deeea 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -357,6 +357,5 @@ @ stdcall leave_apartment(ptr) @ stdcall apartment_findfromoxid(int64) @ stdcall apartment_getwindow(ptr) -@ stdcall apartment_global_cleanup() @ stdcall apartment_createwindowifneeded(ptr) @ stdcall apartment_findfromtid(long) diff --git a/dlls/combase/combase_private.h b/dlls/combase/combase_private.h index 61b76657494..e62204d289c 100644 --- a/dlls/combase/combase_private.h +++ b/dlls/combase/combase_private.h @@ -105,6 +105,7 @@ static inline struct apartment* com_get_current_apt(void) HWND WINAPI apartment_getwindow(const struct apartment *apt) DECLSPEC_HIDDEN; HRESULT WINAPI apartment_createwindowifneeded(struct apartment *apt) DECLSPEC_HIDDEN; void apartment_freeunusedlibraries(struct apartment *apt, DWORD unload_delay) DECLSPEC_HIDDEN; +void apartment_global_cleanup(void) DECLSPEC_HIDDEN;
/* RpcSs interface */ HRESULT rpcss_get_next_seqid(DWORD *id) DECLSPEC_HIDDEN; diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index ef9888d9e38..748c5c1bdfd 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1323,7 +1323,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved) if (reserved) break; release_std_git(); RPC_UnregisterAllChannelHooks(); - apartment_global_cleanup(); break;
case DLL_THREAD_DETACH: diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index e68d7b3b3da..953574423aa 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -248,7 +248,6 @@ extern HRESULT WINAPI enter_apartment(struct oletls *info, DWORD model) DECLSPEC void WINAPI leave_apartment(struct oletls *info) DECLSPEC_HIDDEN; extern struct apartment * WINAPI apartment_get_current_or_mta(void) DECLSPEC_HIDDEN; extern HRESULT WINAPI apartment_get_local_server_stream(struct apartment *apt, IStream **ret) DECLSPEC_HIDDEN; -extern void WINAPI apartment_global_cleanup(void) DECLSPEC_HIDDEN;
/* DCOM messages used by the apartment window (not compatible with native) */ #define DM_EXECUTERPC (WM_USER + 0) /* WPARAM = 0, LPARAM = (struct dispatch_params *) */