Commit 1ed73fae authored by Alexandre Julliard's avatar Alexandre Julliard

Call the user signal proc for exe modules too, to avoid duplicating

the module cleanup code.
parent dcff0007
......@@ -1088,7 +1088,6 @@
@ stdcall GetModuleFileName16(long ptr long)
@ stdcall GetModuleHandle16(str)
@ stdcall GetModuleName16(long ptr long)
@ stdcall GetModuleUsage16(long)
@ stdcall GetSelectorBase(long)
@ stdcall GetSelectorLimit16(long)
@ stdcall GetThreadQueue16(long)
......
......@@ -292,21 +292,6 @@ static void thread_detach(void)
WIN_DestroyThreadWindows( GetDesktopWindow() );
QUEUE_DeleteMsgQueue();
if (!(NtCurrentTeb()->tibflags & TEBF_WIN32))
{
HMODULE16 hModule = GetExePtr( MapHModuleLS(0) );
/* FIXME: maybe destroy menus (Windows only complains about them
* but does nothing);
*/
if (GetModuleUsage16( hModule ) <= 1)
{
/* ModuleUnload() in "Internals" */
/* HOOK_FreeModuleHooks( hModule ); */
CLASS_FreeModuleClasses( hModule );
CURSORICON_FreeModuleIcons( hModule );
}
}
exiting_thread_id = 0;
}
......
......@@ -1282,13 +1282,11 @@ static BOOL16 NE_FreeModule( HMODULE16 hModule, BOOL call_wep )
if (call_wep && !(pModule->flags & NE_FFLAGS_WIN32))
{
/* Free the objects owned by the DLL module */
NE_CallUserSignalProc( hModule, USIG16_DLL_UNLOAD );
if (pModule->flags & NE_FFLAGS_LIBMODULE)
{
MODULE_CallWEP( hModule );
/* Free the objects owned by the DLL module */
NE_CallUserSignalProc( hModule, USIG16_DLL_UNLOAD );
}
else
call_wep = FALSE; /* We are freeing a task -> no more WEPs */
}
......
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