[2/2] d3drm: Forward all IUnknown methods to IDirect3DRM
André Hentschel
nerv at dawncrow.de
Thu Jan 19 15:06:08 CST 2012
---
dlls/d3drm/d3drm.c | 28 ++++------------------------
1 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c
index 2850c7f..879d8b0 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 ***/
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120119/57532495/attachment.ksh>
More information about the wine-patches
mailing list