From 863f432a7d73b8b480a742fcbaf01de33964cc21 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 29 Jun 2015 12:18:12 +0200 Subject: [PATCH] windowscodecs: Distinguish interface and implementation pointer for IcnsEncoder. --- dlls/windowscodecs/icnsformat.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/icnsformat.c b/dlls/windowscodecs/icnsformat.c index 5ce44a27185..54c77078bea 100644 --- a/dlls/windowscodecs/icnsformat.c +++ b/dlls/windowscodecs/icnsformat.c @@ -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; } -- 2.11.4.GIT