From 8b36b6317bfe14e18e862160a1a03844ab547a90 Mon Sep 17 00:00:00 2001 From: Bertho Stultiens Date: Sat, 22 May 1999 11:25:24 +0000 Subject: [PATCH] Fixed wrong NE module registration so that resources work. --- loader/elfdll.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/loader/elfdll.c b/loader/elfdll.c index 30f510231d8..f54a6b6a0ca 100644 --- a/loader/elfdll.c +++ b/loader/elfdll.c @@ -27,6 +27,7 @@ DECLARE_DEBUG_CHANNEL(elfdll) /*------------------ HACKS -----------------*/ extern DWORD fixup_imports(WINE_MODREF *wm); +extern void dump_exports(HMODULE hModule); /*---------------- END HACKS ---------------*/ char *extra_ld_library_path = NULL; /* The extra search-path set in wine.conf */ @@ -254,13 +255,16 @@ static WINE_MODREF *ELFDLL_CreateModref(HMODULE hModule, LPCSTR path) */ static HMODULE16 ELFDLL_CreateNEModule(NE_MODULE *ne_image, DWORD size) { + NE_MODULE *pModule; HMODULE16 hModule = GLOBAL_CreateBlock(GMEM_MOVEABLE, ne_image, size, 0, FALSE, FALSE, FALSE, NULL); if(!hModule) return (HMODULE16)0; FarSetOwner16(hModule, hModule); - NE_RegisterModule(ne_image); + pModule = (NE_MODULE *)GlobalLock16(hModule); + pModule->self = hModule; + NE_RegisterModule(pModule); return hModule; } @@ -326,6 +330,8 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err) return NULL; } + dump_exports(image->pe_module_start); + *err = 0; return wm; } -- 2.11.4.GIT