=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: d3drm: Implement IDirect3DRMWinDevice_GetClassName.
Alexandre Julliard
julliard at winehq.org
Mon Jun 18 15:00:24 CDT 2012
Module: wine
Branch: master
Commit: d9ec2b6dfddb1dbc6f38b93a25cebd7a6a2a24d9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9ec2b6dfddb1dbc6f38b93a25cebd7a6a2a24d9
Author: André Hentschel <nerv at dawncrow.de>
Date: Sun Jun 17 19:04:50 2012 +0200
d3drm: Implement IDirect3DRMWinDevice_GetClassName.
---
dlls/d3drm/device.c | 6 +++---
dlls/d3drm/tests/d3drm.c | 26 ++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c
index 60fbe98..d85670a 100644
--- a/dlls/d3drm/device.c
+++ b/dlls/d3drm/device.c
@@ -1115,13 +1115,13 @@ static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetName(IDirect3DRMWinDevice* ifa
}
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetClassName(IDirect3DRMWinDevice* iface,
- LPDWORD size, LPSTR name)
+ LPDWORD size, LPSTR name)
{
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
- FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
+ TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
- return E_NOTIMPL;
+ return IDirect3DRMDevice3_GetClassName(&This->IDirect3DRMDevice3_iface, size, name);
}
/*** IDirect3DRMWinDevice methods ***/
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
index f304346..e71d89f 100644
--- a/dlls/d3drm/tests/d3drm.c
+++ b/dlls/d3drm/tests/d3drm.c
@@ -20,6 +20,7 @@
#define COBJMACROS
#include <d3drm.h>
#include <initguid.h>
+#include <d3drmwin.h>
#include "wine/test.h"
@@ -1086,6 +1087,7 @@ static void test_Device(void)
LPDIRECT3DRM pD3DRM;
LPDIRECTDRAWCLIPPER pClipper;
LPDIRECT3DRMDEVICE pDevice;
+ LPDIRECT3DRMWINDEVICE pWinDevice;
GUID driver;
HWND window;
RECT rc;
@@ -1121,6 +1123,30 @@ static void test_Device(void)
ok(size == sizeof("Device"), "wrong size: %u\n", size);
ok(!strcmp(cname, "Device"), "Expected cname to be \"Device\", but got \"%s\"\n", cname);
+ /* WinDevice */
+ hr = IDirect3DRMDevice_QueryInterface(pDevice, &IID_IDirect3DRMWinDevice, (LPVOID*)&pWinDevice);
+ if (FAILED(hr))
+ {
+ win_skip("Cannot get IDirect3DRMWinDevice interface (hr = %x), skipping tests\n", hr);
+ goto cleanup;
+ }
+
+ hr = IDirect3DRMWinDevice_GetClassName(pWinDevice, NULL, cname);
+ ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
+ hr = IDirect3DRMWinDevice_GetClassName(pWinDevice, NULL, NULL);
+ ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
+ size = 1;
+ hr = IDirect3DRMWinDevice_GetClassName(pWinDevice, &size, cname);
+ ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
+ size = sizeof(cname);
+ hr = IDirect3DRMWinDevice_GetClassName(pWinDevice, &size, cname);
+ ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
+ ok(size == sizeof("Device"), "wrong size: %u\n", size);
+ ok(!strcmp(cname, "Device"), "Expected cname to be \"Device\", but got \"%s\"\n", cname);
+
+ IDirect3DRMWinDevice_Release(pWinDevice);
+
+cleanup:
IDirect3DRMDevice_Release(pDevice);
IDirectDrawClipper_Release(pClipper);
More information about the wine-cvs
mailing list