d3d9/tests: Use LONG instead of long.

This commit is contained in:
Michael Stefaniuc 2009-03-18 10:55:22 +01:00 committed by Alexandre Julliard
parent d4c2a387c8
commit 2df012a01a
3 changed files with 11 additions and 11 deletions

View File

@ -43,7 +43,7 @@ static HWND create_window(void)
return ret;
}
static unsigned long getref(IUnknown *obj) {
static ULONG getref(IUnknown *obj) {
IUnknown_AddRef(obj);
return IUnknown_Release(obj);
}
@ -108,7 +108,7 @@ static void test_qi_ex_to_base(void)
HRESULT hr;
HWND window = create_window();
D3DPRESENT_PARAMETERS present_parameters;
unsigned long ref;
ULONG ref;
hr = pDirect3DCreate9Ex(D3D_SDK_VERSION, &d3d9ex);
ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "Direct3DCreate9Ex returned %08x\n", hr);
@ -124,9 +124,9 @@ static void test_qi_ex_to_base(void)
ok(d3d9 != NULL && d3d9 != (void *) 0xdeadbeef,
"QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", d3d9);
ref = getref((IUnknown *) d3d9ex);
ok(ref == 2, "IDirect3D9Ex refcount is %ld, expected 2\n", ref);
ok(ref == 2, "IDirect3D9Ex refcount is %d, expected 2\n", ref);
ref = getref((IUnknown *) d3d9);
ok(ref == 2, "IDirect3D9 refcount is %ld, expected 2\n", ref);
ok(ref == 2, "IDirect3D9 refcount is %d, expected 2\n", ref);
memset(&present_parameters, 0, sizeof(present_parameters));
present_parameters.Windowed = TRUE;
@ -151,9 +151,9 @@ static void test_qi_ex_to_base(void)
ok(deviceEx != NULL && deviceEx != (void *) 0xdeadbeef,
"QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", deviceEx);
ref = getref((IUnknown *) device);
ok(ref == 2, "IDirect3DDevice9 refcount is %ld, expected 2\n", ref);
ok(ref == 2, "IDirect3DDevice9 refcount is %d, expected 2\n", ref);
ref = getref((IUnknown *) deviceEx);
ok(ref == 2, "IDirect3DDevice9Ex refcount is %ld, expected 2\n", ref);
ok(ref == 2, "IDirect3DDevice9Ex refcount is %d, expected 2\n", ref);
if(deviceEx) IDirect3DDevice9Ex_Release(deviceEx);
IDirect3DDevice9_Release(device);
@ -171,9 +171,9 @@ static void test_qi_ex_to_base(void)
ok(deviceEx != NULL && deviceEx != (void *) 0xdeadbeef,
"QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", deviceEx);
ref = getref((IUnknown *) device);
ok(ref == 2, "IDirect3DDevice9 refcount is %ld, expected 2\n", ref);
ok(ref == 2, "IDirect3DDevice9 refcount is %d, expected 2\n", ref);
ref = getref((IUnknown *) deviceEx);
ok(ref == 2, "IDirect3DDevice9Ex refcount is %ld, expected 2\n", ref);
ok(ref == 2, "IDirect3DDevice9Ex refcount is %d, expected 2\n", ref);
if(deviceEx) IDirect3DDevice9Ex_Release(deviceEx);
IDirect3DDevice9_Release(device);

View File

@ -314,7 +314,7 @@ static void test_lockrect_invalid(IDirect3DDevice9 *device)
IDirect3DSurface9_Release(surface);
}
static unsigned long getref(IUnknown *iface)
static ULONG getref(IUnknown *iface)
{
IUnknown_AddRef(iface);
return IUnknown_Release(iface);

View File

@ -2856,7 +2856,7 @@ static void release_buffer_test(IDirect3DDevice9 *device)
IDirect3DIndexBuffer9 *ib = NULL;
HRESULT hr;
BYTE *data;
long ref;
LONG ref;
static const struct vertex quad[] = {
{-1.0, -1.0, 0.1, 0xffff0000},
@ -2905,7 +2905,7 @@ static void release_buffer_test(IDirect3DDevice9 *device)
/* Now destroy the bound index buffer and draw again */
ref = IDirect3DIndexBuffer9_Release(ib);
ok(ref == 0, "Index Buffer reference count is %08ld\n", ref);
ok(ref == 0, "Index Buffer reference count is %08d\n", ref);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0);
ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr);