diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c
index 879d8b0..42d722c 100644
--- a/dlls/d3drm/d3drm.c
+++ b/dlls/d3drm/d3drm.c
@@ -87,10 +87,11 @@ static HRESULT WINAPI
IDirect3DRMImpl_QueryInterface(IDirect3DRM* iface, REFIID
static ULONG WINAPI IDirect3DRMImpl_AddRef(IDirect3DRM* iface)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p/%p)\n", iface, This);
+ TRACE("(%p/%p): AddRef from %d\n", iface, This, ref - 1);
- return InterlockedIncrement(&This->ref);
+ return ref;
}
static ULONG WINAPI IDirect3DRMImpl_Release(IDirect3DRM* iface)
@@ -98,7 +99,7 @@ static ULONG WINAPI
IDirect3DRMImpl_Release(IDirect3DRM* iface)
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p/%p)\n", iface, This);
+ TRACE("(%p/%p): ReleaseRef to %d\n", iface, This, ref);
if (!ref)
HeapFree(GetProcessHeap(), 0, This);
diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c
index 559128e..6f9802a 100644
--- a/dlls/d3drm/device.c
+++ b/dlls/d3drm/device.c
@@ -93,10 +93,11 @@ static HRESULT WINAPI
IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2*
static ULONG WINAPI
IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface)
{
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)\n", This);
+ TRACE("(%p): AddRef from %d\n", This, ref - 1);
- return InterlockedIncrement(&This->ref);
+ return ref;
}