Alexandre Julliard : ctapi32: Don' t unload external libraries on process shutdown.

Alexandre Julliard julliard at winehq.org
Tue Apr 30 12:51:28 CDT 2013


Module: wine
Branch: master
Commit: 6eca89efa7c0aa673a488833c3d20cfc260cfce4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6eca89efa7c0aa673a488833c3d20cfc260cfce4

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 30 17:25:29 2013 +0200

ctapi32: Don't unload external libraries on process shutdown.

---

 dlls/ctapi32/ctapi32.c |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/dlls/ctapi32/ctapi32.c b/dlls/ctapi32/ctapi32.c
index 7889e2a..089e0ab 100644
--- a/dlls/ctapi32/ctapi32.c
+++ b/dlls/ctapi32/ctapi32.c
@@ -92,16 +92,6 @@ LOAD_FUNCPTR(CT_close);
 	return 0;
 }
 
-static void unload_functions(void)
-{
-	pCT_close = NULL;
-	pCT_data = NULL;
-	pCT_init = NULL;
-	if (ctapi_handle)
-		wine_dlclose(ctapi_handle, NULL, 0);
-}
-
-
 /*
  *  ct-API specific functions
  */
@@ -137,18 +127,15 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     switch (fdwReason)
     {
         case DLL_PROCESS_ATTACH:
-        {
             DisableThreadLibraryCalls(hinstDLL);
             /* Try to load low-level library */
             if (load_functions() != 0)
 		return FALSE;  /* error */
             break;
-        }
         case DLL_PROCESS_DETACH:
-        {
-            unload_functions();
+            if (lpvReserved) break;
+            if (ctapi_handle) wine_dlclose(ctapi_handle, NULL, 0);
             break;
-        }
     }
 
     return TRUE;




More information about the wine-cvs mailing list