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

the module cleanup code.
This commit is contained in:
Alexandre Julliard 2003-05-16 20:16:56 +00:00
parent dcff0007b6
commit 1ed73fae13
3 changed files with 4 additions and 22 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -1282,13 +1282,11 @@ static BOOL16 NE_FreeModule( HMODULE16 hModule, BOOL call_wep )
if (call_wep && !(pModule->flags & NE_FFLAGS_WIN32))
{
if (pModule->flags & NE_FFLAGS_LIBMODULE)
{
MODULE_CallWEP( hModule );
/* Free the objects owned by the DLL module */
NE_CallUserSignalProc( hModule, USIG16_DLL_UNLOAD );
/* Free the objects owned by the DLL module */
NE_CallUserSignalProc( hModule, USIG16_DLL_UNLOAD );
}
if (pModule->flags & NE_FFLAGS_LIBMODULE)
MODULE_CallWEP( hModule );
else
call_wep = FALSE; /* We are freeing a task -> no more WEPs */
}