[PATCH 2/3] dmloader: Display new ref in AddRef and Release.

Christian Costa titan.costa at gmail.com
Tue Nov 6 05:45:45 CST 2012


Thanks for spotting. I will send an additional patch for that or do an
update.

2012/11/6 Nikolay Sivov <bunglehead at gmail.com>

> On 11/6/2012 14:09, Alistair Leslie-Hughes wrote:
>
>> Hi,
>>
>> On 6/11/2012 7:05 PM, Christian Costa wrote:
>>
>>    static HRESULT WINAPI IDirectMusicLoaderImpl_**
>>> IDirectMusicLoader_GetObject(**LPDIRECTMUSICLOADER8 iface,
>>> LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID* ppv)
>>> @@ -880,7 +884,7 @@ HRESULT WINAPI DMUSIC_**CreateDirectMusicLoaderImpl
>>> (LPCGUID lpcGUID, LPVOID *ppob
>>>           return E_OUTOFMEMORY;
>>>       }
>>>       obj->IDirectMusicLoader8_**iface.lpVtbl =
>>> &DirectMusicLoader_Loader_**Vtbl;
>>> -    obj->dwRef = 0; /* will be inited with QueryInterface */
>>> +    obj->ref = 0; /* Will be inited with QueryInterface */
>>>
>>
>> Shouldn't obj->ref start at 1 or else it will never be freed.
>>
> It's supposed to be incremented later with QI call, see comment. This
> module is still dusty and COM cleanup is necessary, this is ugly:
>
> ---
>     IDirectMusicLoader_SetObject ((LPDIRECTMUSICLOADER8)obj, &Desc);
> ---
>     return IDirectMusicLoaderImpl_**IDirectMusicLoader_**QueryInterface
> ((LPDIRECTMUSICLOADER8)obj, lpcGUID, ppobj);
> ---
>
>
>> Best Regards
>>  Alistair Leslie-Hughes
>>
>>
>>
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20121106/31cee6e9/attachment.html>


More information about the wine-devel mailing list