diff --git a/include/user.h b/include/user.h index 8e6c5e21aeb..2e9923c1222 100644 --- a/include/user.h +++ b/include/user.h @@ -32,7 +32,5 @@ extern WORD USER_HeapSel; void WINAPI USER_SignalProc(HANDLE16, UINT16, UINT16, HINSTANCE16, HQUEUE16); void USER_ExitWindows(void); void USER_QueueCleanup( HQUEUE16 hQueue ); -HGLOBAL16 USER_CallDefaultRsrcHandler( HGLOBAL16 hMemObj, HMODULE16 hModule, - HRSRC16 hRsrc ); #endif /* __WINE_USER_H */ diff --git a/loader/main.c b/loader/main.c index 8013b62796f..c4999efad53 100644 --- a/loader/main.c +++ b/loader/main.c @@ -222,6 +222,9 @@ BOOL WINAPI MAIN_UserInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserve /* Initialize menus */ if (!MENU_Init()) return FALSE; + /* Initialize cursor/icons */ + CURSORICON_Init(); + /* Initialize multimedia */ if (!MULTIMEDIA_Init()) return FALSE; diff --git a/loader/module.c b/loader/module.c index d8bd4f60a84..75c4413388c 100644 --- a/loader/module.c +++ b/loader/module.c @@ -299,10 +299,6 @@ FARPROC16 MODULE_GetWndProcEntry16( LPCSTR name ) return (FARPROC16)ReplaceTextDlgProc16; if (!strcmp(name,"DefResourceHandler")) return (FARPROC16)NE_DefResourceHandler; - if (!strcmp(name,"LoadDIBIconHandler")) - return (FARPROC16)LoadDIBIconHandler16; - if (!strcmp(name,"LoadDIBCursorHandler")) - return (FARPROC16)LoadDIBCursorHandler16; FIXME(module,"No mapping for %s(), add one in library/miscstubs.c\n",name); assert( FALSE ); return NULL; diff --git a/windows/user.c b/windows/user.c index 4c5d320f635..b54ea8c044e 100644 --- a/windows/user.c +++ b/windows/user.c @@ -16,6 +16,7 @@ #include "win.h" #include "clipboard.h" #include "menu.h" +#include "cursoricon.h" #include "hook.h" #include "debug.h" #include "toolhelp.h" @@ -96,51 +97,11 @@ BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo ) return TRUE; } -static FARPROC16 __r16loader = NULL; - -/********************************************************************** - * USER_CallDefaultRsrcHandler - * - * Called by the LoadDIBIcon/CursorHandler(). - */ -HGLOBAL16 USER_CallDefaultRsrcHandler( HGLOBAL16 hMemObj, HMODULE16 hModule, HRSRC16 hRsrc ) -{ - return Callbacks->CallResourceHandlerProc( __r16loader, hMemObj, hModule, hRsrc ); -} - -/********************************************************************** - * USER_InstallRsrcHandler - */ -static void USER_InstallRsrcHandler( HINSTANCE16 hInstance ) -{ - FARPROC16 proc; - - /* SetResourceHandler() returns previous function which is set - * when a module's resource table is loaded. */ - - proc = SetResourceHandler16( hInstance, RT_ICON16, - MODULE_GetWndProcEntry16("LoadDIBIconHandler") ); - if (!__r16loader) __r16loader = proc; - - proc = SetResourceHandler16( hInstance, RT_CURSOR16, - MODULE_GetWndProcEntry16("LoadDIBCursorHandler") ); - if (!__r16loader) __r16loader = proc; -} - /********************************************************************** * InitApp (USER.5) */ INT16 WINAPI InitApp16( HINSTANCE16 hInstance ) { - /* InitTask() calls LibMain()'s of implicitly loaded DLLs - * prior to InitApp() so there is no clean way to do - * SetTaskSignalHandler() in time. So, broken Windows bypasses - * a pTask->userhandler on startup and simply calls a global - * function pointer to the default USER signal handler. - */ - - USER_InstallRsrcHandler( hInstance ); - /* Hack: restore the divide-by-zero handler */ /* FIXME: should set a USER-specific handler that displays a msg box */ INT_SetPMHandler( 0, INT_GetPMHandler( 0xff ) ); @@ -158,6 +119,7 @@ static void USER_ModuleUnload( HMODULE16 hModule ) { HOOK_FreeModuleHooks( hModule ); CLASS_FreeModuleClasses( hModule ); + CURSORICON_FreeModuleIcons( hModule ); } /********************************************************************** @@ -244,7 +206,6 @@ void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode, break; case USIG_DLL_LOAD: - USER_InstallRsrcHandler( hTaskOrModule ); /* module */ break; case USIG_DLL_UNLOAD: