Commit 6eca89ef authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent be417d68
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment