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

This commit is contained in:
Alexandre Julliard 2013-04-30 17:25:29 +02:00
parent be417d6890
commit 6eca89efa7
1 changed files with 2 additions and 15 deletions

View File

@ -92,16 +92,6 @@ LOAD_FUNCPTR(CT_close);
return 0; 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 * ct-API specific functions
*/ */
@ -137,19 +127,16 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch (fdwReason) switch (fdwReason)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
{
DisableThreadLibraryCalls(hinstDLL); DisableThreadLibraryCalls(hinstDLL);
/* Try to load low-level library */ /* Try to load low-level library */
if (load_functions() != 0) if (load_functions() != 0)
return FALSE; /* error */ return FALSE; /* error */
break; break;
}
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
{ if (lpvReserved) break;
unload_functions(); if (ctapi_handle) wine_dlclose(ctapi_handle, NULL, 0);
break; break;
} }
}
return TRUE; return TRUE;
} }