Zebediah Figura z.figura12@gmail.com writes:
+static HRESULT dll_list_add(LPCSTR library_name, struct open_dll **ret) +{
- struct open_dll *dll;
- HMODULE16 library;
- FARPROC16 DllCanUnloadNow;
- LIST_FOR_EACH_ENTRY(dll, &open_dll_list, struct open_dll, entry)
- {
if(!strcasecmp(library_name, dll->library_name))
{
TRACE("found %s already loaded\n", debugstr_a(library_name));
InterlockedIncrement(&dll->refs);
*ret = dll;
return S_OK;
}
- }
I don't think that comparing file names is appropriate for 16-bit, only the module name matters. You should probably call LoadLibrary16 in all cases.
- library = LoadLibrary16(library_name);
- if (!library)
- {
ERR("couldn't load in-process dll %s\n", debugstr_a(library_name));
return E_ACCESSDENIED; /* FIXME: or should this be CO_E_DLLNOTFOUND? */
- }
You'd need to check again if the dll already exists, like the 32-bit code does.