windowscodecs: Distinguish interface and implementation pointer for IcnsEncoder.

This commit is contained in:
Sebastian Lackner 2015-06-29 12:18:12 +02:00 committed by Alexandre Julliard
parent d37f407645
commit 863f432a7d

View File

@ -179,7 +179,7 @@ static ULONG WINAPI IcnsFrameEncode_Release(IWICBitmapFrameEncode *iface)
if (This->icns_image != NULL)
HeapFree(GetProcessHeap(), 0, This->icns_image);
IUnknown_Release((IUnknown*)This->encoder);
IWICBitmapFrameEncode_Release(&This->encoder->IWICBitmapFrameEncode_iface);
HeapFree(GetProcessHeap(), 0, This);
}
@ -489,7 +489,7 @@ static HRESULT WINAPI IcnsEncoder_QueryInterface(IWICBitmapEncoder *iface, REFII
if (IsEqualIID(&IID_IUnknown, iid) ||
IsEqualIID(&IID_IWICBitmapEncoder, iid))
{
*ppv = This;
*ppv = &This->IWICBitmapEncoder_iface;
}
else
{
@ -639,7 +639,7 @@ static HRESULT WINAPI IcnsEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
frameEncode->committed = FALSE;
*ppIFrameEncode = &frameEncode->IWICBitmapFrameEncode_iface;
This->outstanding_commits++;
IUnknown_AddRef((IUnknown*)This);
IWICBitmapEncoder_AddRef(&This->IWICBitmapEncoder_iface);
end:
LeaveCriticalSection(&This->lock);
@ -725,8 +725,8 @@ HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv)
InitializeCriticalSection(&This->lock);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IcnsEncoder.lock");
ret = IUnknown_QueryInterface((IUnknown*)This, iid, ppv);
IUnknown_Release((IUnknown*)This);
ret = IWICBitmapEncoder_QueryInterface(&This->IWICBitmapEncoder_iface, iid, ppv);
IWICBitmapEncoder_Release(&This->IWICBitmapEncoder_iface);
return ret;
}