[v3 1/5] compobj.dll16: Implement CoLoadLibrary16 and CoFreeLibrary16.

Alexandre Julliard julliard at winehq.org
Mon Feb 13 12:28:20 CST 2017


Zebediah Figura <z.figura12 at gmail.com> writes:

> On 02/13/2017 06:56 AM, Alexandre Julliard wrote:
>> Zebediah Figura <z.figura12 at 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?

No, probably not.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list