On 02/13/2017 06:56 AM, Alexandre Julliard wrote:
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.
Please excuse my ignorance, but if LoadLibrary16 already implements a refcount, then is it even necessary to reimplement one here?