http://bugs.winehq.org/show_bug.cgi?id=5294
------- Additional Comments From focht@gmx.net 2007-15-05 12:28 ------- Hello,
i hope the problem became clear now? In my essay:
--- quote --- When the regsvr32 process calls DllRegisterServer, it tries to register its interfaces by gathering data from .rsrc section (REGISTRY resource types). This is done by explicit LoadLibraryEx with LOAD_LIBRARY_AS_DATAFILE flag set and appropriate Find/LoadResource API. --- quote ---
The phrase "it tries" was meant to be read "the inproc server tries". Perhaps this lead to misunderstanding :)
Let LOAD_LIBRARY_AS_DATAFILE case just honour already loaded modules. A possible fix would be:
--- snip dlls/kernel32/module.c --- static HMODULE load_library( const UNICODE_STRING *libname, DWORD flags ) { ..
if (flags & LOAD_LIBRARY_AS_DATAFILE) { if( GetModuleHandleW(libname) == 0) { /* The method in load_library_as_datafile allows searching for the * 'native' libraries only */ if (load_library_as_datafile( libname->Buffer, &hModule )) return hModule; } flags |= DONT_RESOLVE_DLL_REFERENCES; /* Just in case */ /* Fallback to normal behaviour */ }
/* do standard loader stuff */ ... } --- snip dlls/kernel32/module.c ---
Regards