From 0c0b6a10965eef238ce6a7aaabdff80bec2365d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Thu, 19 Jan 2012 22:06:08 +0100 Subject: [PATCH] d3drm: Forward all IUnknown methods to IDirect3DRM. --- dlls/d3drm/d3drm.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index 2850c7fa31..879d8b0639 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -452,23 +452,13 @@ static HRESULT WINAPI IDirect3DRM2Impl_QueryInterface(IDirect3DRM2* iface, REFII static ULONG WINAPI IDirect3DRM2Impl_AddRef(IDirect3DRM2* iface) { IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface); - - TRACE("(%p/%p)\n", iface, This); - - return InterlockedIncrement(&This->ref); + return IDirect3DRM_AddRef(&This->IDirect3DRM_iface); } static ULONG WINAPI IDirect3DRM2Impl_Release(IDirect3DRM2* iface) { IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p/%p)\n", iface, This); - - if (!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; + return IDirect3DRM_Release(&This->IDirect3DRM_iface); } /*** IDirect3DRM2 methods ***/ @@ -883,23 +873,13 @@ static HRESULT WINAPI IDirect3DRM3Impl_QueryInterface(IDirect3DRM3* iface, REFII static ULONG WINAPI IDirect3DRM3Impl_AddRef(IDirect3DRM3* iface) { IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface); - - TRACE("(%p/%p)\n", iface, This); - - return InterlockedIncrement(&This->ref); + return IDirect3DRM_AddRef(&This->IDirect3DRM_iface); } static ULONG WINAPI IDirect3DRM3Impl_Release(IDirect3DRM3* iface) { IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p/%p)\n", iface, This); - - if (!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; + return IDirect3DRM_Release(&This->IDirect3DRM_iface); } /*** IDirect3DRM3 methods ***/