[PATCH 18/31] dlls/dpnet/tests: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Thu Feb 24 04:28:26 CST 2022


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/dpnet/tests/Makefile.in |    1 
 dlls/dpnet/tests/address.c   |  194 +++++++++++------------
 dlls/dpnet/tests/client.c    |  362 +++++++++++++++++++++---------------------
 dlls/dpnet/tests/server.c    |   82 +++++-----
 dlls/dpnet/tests/thread.c    |  108 ++++++-------
 5 files changed, 373 insertions(+), 374 deletions(-)

diff --git a/dlls/dpnet/tests/Makefile.in b/dlls/dpnet/tests/Makefile.in
index 2bef531a9ca..62ef3f7c47c 100644
--- a/dlls/dpnet/tests/Makefile.in
+++ b/dlls/dpnet/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 TESTDLL   = dpnet.dll
 IMPORTS   = dxguid uuid dpnet ole32 oleaut32 version advapi32
 
diff --git a/dlls/dpnet/tests/address.c b/dlls/dpnet/tests/address.c
index fe17cfde52d..260d960f42b 100644
--- a/dlls/dpnet/tests/address.c
+++ b/dlls/dpnet/tests/address.c
@@ -40,30 +40,30 @@ static void create_directplay_address(void)
         GUID guidsp;
 
         hr = IDirectPlay8Address_GetSP(localaddr, NULL);
-        ok(hr == DPNERR_INVALIDPOINTER, "GetSP failed 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "GetSP failed 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetSP(localaddr, &guidsp);
-        ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_SetSP(localaddr, &GUID_NULL);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetSP(localaddr, &guidsp);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(IsEqualGUID(&guidsp, &GUID_NULL), "wrong guid: %s\n", wine_dbgstr_guid(&guidsp));
 
         hr = IDirectPlay8Address_SetSP(localaddr, &IID_Random);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetSP(localaddr, &guidsp);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(IsEqualGUID(&guidsp, &IID_Random), "wrong guid: %s\n", wine_dbgstr_guid(&guidsp));
 
         hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetSP(localaddr, &guidsp);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(IsEqualGUID(&guidsp, &CLSID_DP8SP_TCPIP), "wrong guid: %s\n", wine_dbgstr_guid(&guidsp));
 
         IDirectPlay8Address_Release(localaddr);
@@ -92,130 +92,130 @@ static void address_addcomponents(void)
 
         /* We can add any Component to the Address interface not just the predefined ones. */
         hr = IDirectPlay8Address_AddComponent(localaddr, L"unknown", &IID_Random, sizeof(GUID), DPNA_DATATYPE_GUID);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, L"unknown", &IID_Random, sizeof(GUID)+1, DPNA_DATATYPE_GUID);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)+2, DPNA_DATATYPE_STRING);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)/2, DPNA_DATATYPE_STRING);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, testing, sizeof(testing)+2, DPNA_DATATYPE_STRING_ANSI);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         /* Show that on error, nothing is added. */
         size = sizeof(buffer);
         hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type);
-        ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, testing, sizeof(testing), DPNA_DATATYPE_STRING_ANSI);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost), DPNA_DATATYPE_STRING);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         /* The information doesn't get removed when invalid parameters are used.*/
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)+2, DPNA_DATATYPE_STRING);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         size = 0;
         hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, NULL, &size, &type);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
-        ok(size == sizeof(localhost), "Invalid string length: %d\n", size);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
+        ok(size == sizeof(localhost), "Invalid string length: %ld\n", size);
 
         size = 1;
         hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, NULL, &size, &type);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         size = sizeof(buffer);
         hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
-        ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
+        ok(type == DPNA_DATATYPE_STRING, "incorrect type %ld\n", type);
         ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer));
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD), DPNA_DATATYPE_DWORD);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetComponentByName(localaddr, NULL, &compguid, &size, &type);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         size = sizeof(GUID)-1;
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", NULL, &size, &type);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         size = sizeof(GUID);
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", NULL, &size, &type);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, NULL, &type);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         size = sizeof(GUID)-1;
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, NULL);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         size = sizeof(GUID);
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, NULL);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         size = sizeof(GUID)-1;
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, &type);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
-        ok(size == sizeof(GUID), "got %d\n", size);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
+        ok(size == sizeof(GUID), "got %ld\n", size);
 
         size = sizeof(GUID);
         hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, &type);
         ok(IsEqualGUID(&compguid, &IID_Random), "incorrect guid\n");
-        ok(size == sizeof(GUID), "incorrect size got %d\n", size);
+        ok(size == sizeof(GUID), "incorrect size got %ld\n", size);
         ok(type == DPNA_DATATYPE_GUID, "incorrect type\n");
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetNumComponents(localaddr, NULL);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetNumComponents(localaddr, &components);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 100, NULL, &namelen, NULL, &bufflen, &type);
-        ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 1, NULL, &namelen, NULL, &bufflen, NULL);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         bufflen = 100;
         namelen = 0;
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 1, name, &namelen, buffer, &bufflen, &type);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         namelen = 100;
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 1, NULL, &namelen, NULL, &bufflen, &type);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 100, NULL, NULL, NULL, &bufflen, &type);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 100, NULL, &namelen, NULL, NULL, &type);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         namelen = 0;
         type = 0;
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 0, NULL, &namelen, NULL, &bufflen, &type);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
-        ok(namelen == 8, "namelen expected 8 got %d\n", namelen);
-        ok(bufflen == 16, "bufflen expected 16 got %d\n", bufflen);
-        ok(type == DPNA_DATATYPE_GUID, "type expected DPNA_DATATYPE_GUID got %d\n", type);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
+        ok(namelen == 8, "namelen expected 8 got %ld\n", namelen);
+        ok(bufflen == 16, "bufflen expected 16 got %ld\n", bufflen);
+        ok(type == DPNA_DATATYPE_GUID, "type expected DPNA_DATATYPE_GUID got %ld\n", type);
 
-        trace("GetNumComponents=%d\n", components);
+        trace("GetNumComponents=%ld\n", components);
         for(i=0; i < components; i++)
         {
             void *buffer;
@@ -224,28 +224,28 @@ static void address_addcomponents(void)
             namelen = 0;
 
             hr = IDirectPlay8Address_GetComponentByIndex(localaddr, i, NULL, &namelen, NULL, &bufflen, &type);
-            ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+            ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
             name =  HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, namelen * sizeof(WCHAR));
             buffer =  HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bufflen);
 
             hr = IDirectPlay8Address_GetComponentByIndex(localaddr, i, name, &namelen, buffer, &bufflen, &type);
-            ok(hr == S_OK, "got 0x%08x\n", hr);
+            ok(hr == S_OK, "got 0x%08lx\n", hr);
             if(hr == S_OK)
             {
                 switch(type)
                 {
                     case DPNA_DATATYPE_STRING:
-                        trace("%d: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_w(buffer));
+                        trace("%ld: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_w(buffer));
                         break;
                     case DPNA_DATATYPE_DWORD:
-                        trace("%d: %s: %d\n", i, wine_dbgstr_w(name), *(DWORD*)buffer);
+                        trace("%ld: %s: %ld\n", i, wine_dbgstr_w(name), *(DWORD*)buffer);
                         break;
                     case DPNA_DATATYPE_GUID:
-                        trace("%d: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_guid( (GUID*)buffer));
+                        trace("%ld: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_guid( (GUID*)buffer));
                         break;
                     case DPNA_DATATYPE_BINARY:
-                        trace("%d: %s: Binary Data %d\n", i, wine_dbgstr_w(name), bufflen);
+                        trace("%ld: %s: Binary Data %ld\n", i, wine_dbgstr_w(name), bufflen);
                         break;
                     default:
                         trace(" Unknown\n");
@@ -278,24 +278,24 @@ static void address_setsp(void)
         DWORD bufflen = 0;
 
         hr = IDirectPlay8Address_GetNumComponents(localaddr, &components);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
-        ok(components == 0, "components=%d\n", components);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
+        ok(components == 0, "components=%ld\n", components);
 
         hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetNumComponents(localaddr, &components);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
-        ok(components == 1, "components=%d\n", components);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
+        ok(components == 1, "components=%ld\n", components);
 
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 0, NULL, &namelen, NULL, &bufflen, &type);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         name =  HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, namelen * sizeof(WCHAR));
 
         hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 0, name, &namelen, (void*)&guid, &bufflen, &type);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
-        ok(type == DPNA_DATATYPE_GUID, "wrong datatype: %d\n", type);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
+        ok(type == DPNA_DATATYPE_GUID, "wrong datatype: %ld\n", type);
         ok(IsEqualGUID(&guid, &CLSID_DP8SP_TCPIP), "wrong guid\n");
 
         HeapFree(GetProcessHeap(), 0, name);
@@ -318,50 +318,50 @@ static void address_urlW(void)
         DWORD port = 4321;
 
         hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetURLW(localaddr, NULL, NULL);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         bufflen = 10;
         hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen);
-        ok(bufflen == 66, "got %d\n", bufflen);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(bufflen == 66, "got %ld\n", bufflen);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(!lstrcmpW(L"x-directplay:/provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D", buffer), "got %s\n", wine_dbgstr_w(buffer));
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD), DPNA_DATATYPE_DWORD);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         bufflen2 = bufflen/2;
         memset( buffer, 0xcc, sizeof(buffer) );
         hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen2);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
         ok(buffer[0] == 0xcccc, "buffer modified\n");
 
         hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(!lstrcmpW(L"x-directplay:/provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D;port=4321", buffer), "got %s\n", wine_dbgstr_w(buffer));
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost), DPNA_DATATYPE_STRING);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(!lstrcmpW(L"x-directplay:/provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D;port=4321;hostname=localhost", buffer), "got %s\n", wine_dbgstr_w(buffer));
 
         IDirectPlay8Address_Release(localaddr);
@@ -386,49 +386,49 @@ static void address_urlA(void)
         DWORD port = 4321;
 
         hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetURLA(localaddr, NULL, NULL);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         bufflen = 10;
         hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         bufflen2 = bufflen/2;
         memset( buffer, 0x55, sizeof(buffer) );
         hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen2);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
         ok(buffer[0] == 0x55, "buffer modified\n");
 
         hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(!lstrcmpA(urlA1, buffer), "got %s\n", buffer);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD), DPNA_DATATYPE_DWORD);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(!lstrcmpA(urlA2, buffer), "got %s\n", buffer);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhostA, sizeof(localhostA), DPNA_DATATYPE_STRING_ANSI);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         bufflen = 0;
         hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen);
-        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         ok(!lstrcmpA(urlA3, buffer), "got %s\n", buffer);
 
         IDirectPlay8Address_Release(localaddr);
@@ -448,34 +448,34 @@ static void address_duplicate(void)
     if(SUCCEEDED(hr))
     {
         hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost), DPNA_DATATYPE_STRING);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Address_GetNumComponents(localaddr, &components);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
-        ok(components == 2, "components=%d\n", components);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
+        ok(components == 2, "components=%ld\n", components);
 
         hr = IDirectPlay8Address_Duplicate(localaddr, &duplicate);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         if(SUCCEEDED(hr))
         {
             DWORD size, type;
             WCHAR buffer[256];
 
             hr = IDirectPlay8Address_GetSP(duplicate, &guid);
-            ok(hr == S_OK, "got 0x%08x\n", hr);
+            ok(hr == S_OK, "got 0x%08lx\n", hr);
             ok(IsEqualGUID(&guid, &CLSID_DP8SP_TCPIP), "wrong guid\n");
 
             hr = IDirectPlay8Address_GetNumComponents(duplicate, &dupcomps);
-            ok(hr == S_OK, "got 0x%08x\n", hr);
-            ok(components == dupcomps, "expected %d got %d\n", components, dupcomps);
+            ok(hr == S_OK, "got 0x%08lx\n", hr);
+            ok(components == dupcomps, "expected %ld got %ld\n", components, dupcomps);
 
             size = sizeof(buffer);
             hr = IDirectPlay8Address_GetComponentByName(duplicate, DPNA_KEY_HOSTNAME, buffer, &size, &type);
-            ok(hr == S_OK, "got 0x%08x\n", hr);
-            ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type);
+            ok(hr == S_OK, "got 0x%08lx\n", hr);
+            ok(type == DPNA_DATATYPE_STRING, "incorrect type %ld\n", type);
             ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer));
 
             IDirectPlay8Address_Release(duplicate);
diff --git a/dlls/dpnet/tests/client.c b/dlls/dpnet/tests/client.c
index da42e6d6951..04d7b18581c 100644
--- a/dlls/dpnet/tests/client.c
+++ b/dlls/dpnet/tests/client.c
@@ -49,7 +49,7 @@ static HRESULT WINAPI DirectPlayServerHandler(void *context, DWORD message_id, v
             /* These are tested in the server test */
             break;
         default:
-            trace("DirectPlayServerHandler: 0x%08x\n", message_id);
+            trace("DirectPlayServerHandler: 0x%08lx\n", message_id);
     }
     return S_OK;
 }
@@ -71,7 +71,7 @@ static HRESULT WINAPI DirectPlayMessageHandler(PVOID context, DWORD message_id,
             break;
         }
         default:
-            trace("DirectPlayMessageHandler: 0x%08x\n", message_id);
+            trace("DirectPlayMessageHandler: 0x%08lx\n", message_id);
     }
 
     return S_OK;
@@ -79,13 +79,13 @@ static HRESULT WINAPI DirectPlayMessageHandler(PVOID context, DWORD message_id,
 
 static HRESULT WINAPI DirectPlayLobbyMessageHandler(PVOID context, DWORD message_id, PVOID buffer)
 {
-    trace("DirectPlayLobbyMessageHandler: 0x%08x\n", message_id);
+    trace("DirectPlayLobbyMessageHandler: 0x%08lx\n", message_id);
     return S_OK;
 }
 
 static HRESULT WINAPI DirectPlayLobbyClientMessageHandler(void *context, DWORD message_id, void* buffer)
 {
-    trace("DirectPlayLobbyClientMessageHandler: 0x%08x\n", message_id);
+    trace("DirectPlayLobbyClientMessageHandler: 0x%08lx\n", message_id);
     return S_OK;
 }
 
@@ -100,13 +100,13 @@ static void create_server(void)
     ok(hr == S_OK, "Failed to create IDirectPlay8Server object\n");
 
     hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayServerHandler, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL,  CLSCTX_ALL, &IID_IDirectPlay8Address, (void **)&localaddr);
     ok(hr == S_OK, "Failed to create IDirectPlay8Address object\n");
 
     hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     memset( &appdesc, 0, sizeof(DPN_APPLICATION_DESC) );
     appdesc.dwSize  = sizeof( DPN_APPLICATION_DESC );
@@ -115,7 +115,7 @@ static void create_server(void)
     appdesc.pwszSessionName  = sessionname;
 
     hr = IDirectPlay8Server_Host(server, &appdesc, &localaddr, 1, NULL, NULL, NULL, 0);
-    todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+    todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     IDirectPlay8Address_Release(localaddr);
 }
@@ -129,30 +129,30 @@ static BOOL test_init_dp(void)
     enumevent = CreateEventA( NULL, TRUE, FALSE, NULL);
 
     hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     memset(&caps, 0, sizeof(DPN_SP_CAPS));
     caps.dwSize = sizeof(DPN_SP_CAPS);
 
     hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %lx\n", hr);
 
     hr = IDirectPlay8Client_Initialize(client, NULL, NULL, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "got %x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "got %lx\n", hr);
 
     hr = IDirectPlay8Client_SetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %lx\n", hr);
 
     hr = IDirectPlay8Client_Initialize(client, NULL, DirectPlayMessageHandler, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %lx\n", hr);
 
     hr = CoCreateInstance(&CLSID_DirectPlay8LobbiedApplication, NULL, CLSCTX_INPROC_SERVER,
                           &IID_IDirectPlay8LobbiedApplication, (void **)&lobbied);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     hr = IDirectPlay8LobbiedApplication_Initialize(lobbied, NULL, DirectPlayLobbyMessageHandler,
                                                 &lobbyConnection, 0);
-    ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %lx\n", hr);
 
     return client != NULL;
 }
@@ -168,22 +168,22 @@ static void test_enum_service_providers(void)
     items = 0;
 
     hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, &size, NULL, 0);
-    ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
 
     hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, NULL, &items, 0);
-    ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
 
     hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, &size, &items, 0);
-    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
     ok(size != 0, "size is unexpectedly 0\n");
 
     serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
 
     hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
     ok(items != 0, "Found unexpectedly no service providers\n");
 
-    trace("number of items found: %d\n", items);
+    trace("number of items found: %ld\n", items);
 
     for (i=0;i<items;i++)
     {
@@ -197,13 +197,13 @@ static void test_enum_service_providers(void)
     items = 0;
 
     hr = IDirectPlay8Client_EnumServiceProviders(client, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0);
-    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
     ok(size != 0, "size is unexpectedly 0\n");
 
     serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
 
     hr = IDirectPlay8Client_EnumServiceProviders(client, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
     ok(items != 0, "Found unexpectedly no adapter\n");
 
 
@@ -216,8 +216,8 @@ static void test_enum_service_providers(void)
     /* Invalid GUID */
     items = 88;
     hr = IDirectPlay8Client_EnumServiceProviders(client, &appguid, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
-    ok(items == 88, "Found adapter %d\n", items);
+    ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
+    ok(items == 88, "Found adapter %ld\n", items);
 
     HeapFree(GetProcessHeap(), 0, serv_prov_info);
 }
@@ -238,65 +238,65 @@ static void test_enum_hosts(void)
     appdesc.guidApplication  = appguid;
 
     hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client2);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&local);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&host);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost),
                                                          DPNA_DATATYPE_STRING);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     caps.dwSize = sizeof(DPN_SP_CAPS);
 
     hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "got %x\n", hr);
+    ok(hr == DPN_OK, "got %lx\n", hr);
     data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, caps.dwMaxEnumPayloadSize + 1);
 
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, 2, 1000, 1000, NULL,  &async, DPNENUMHOSTS_SYNC);
-    ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, data, caps.dwMaxEnumPayloadSize + 1,
                                         INFINITE, 0, INFINITE, NULL,  &async, DPNENUMHOSTS_SYNC);
-    ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
     async = 0;
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, data, caps.dwMaxEnumPayloadSize + 1, INFINITE, 0,
                                         INFINITE, NULL,  &async, 0);
-    ok(hr == DPNERR_ENUMQUERYTOOLARGE, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_ENUMQUERYTOOLARGE, "got 0x%08lx\n", hr);
     ok(!async, "Handle returned\n");
 
     async = 0;
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, data, caps.dwMaxEnumPayloadSize, INFINITE, 0, INFINITE,
                                         NULL,  &async, 0);
-    ok(hr == DPNSUCCESS_PENDING, "got 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "got 0x%08lx\n", hr);
     todo_wine ok(async, "No Handle returned\n");
 
     /* This CancelAsyncOperation doesn't generate a DPN_MSGID_ASYNC_OP_COMPLETE */
     hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
     HeapFree(GetProcessHeap(), 0, data);
 
     /* No Initialize has been called on client2. */
     hr = IDirectPlay8Client_EnumHosts(client2, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
 
     /* Since we are running asynchronously, EnumHosts returns DPNSUCCESS_PENDING. */
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
     todo_wine ok(async, "No Handle returned\n");
 
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async2, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
     todo_wine ok(async2, "No Handle returned\n");
     todo_wine ok(async2 != async, "Same handle returned.\n");
 
@@ -305,23 +305,23 @@ static void test_enum_hosts(void)
     lastAsyncCode = E_FAIL;
     lastAsyncHandle = 0xdeadbeef;
     hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr);
-    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode);
-    todo_wine ok(lastAsyncHandle == async, "got 0x%08x\n", async);
+    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
+    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode);
+    todo_wine ok(lastAsyncHandle == async, "got 0x%08lx\n", async);
 
     hr = IDirectPlay8Client_Initialize(client2, NULL, DirectPlayMessageHandler, 0);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     /* Show that handlers are per object. */
     hr = IDirectPlay8Client_CancelAsyncOperation(client2, async2, 0);
-    todo_wine ok(hr == DPNERR_INVALIDHANDLE, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr);
+    todo_wine ok(hr == DPNERR_INVALIDHANDLE, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
 
     lastAsyncCode = E_FAIL;
     lastAsyncHandle = 0xdeadbeef;
     hr = IDirectPlay8Client_CancelAsyncOperation(client, async2, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr);
-    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode);
-    todo_wine ok(lastAsyncHandle == async2, "got 0x%08x\n", async2);
+    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
+    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode);
+    todo_wine ok(lastAsyncHandle == async2, "got 0x%08lx\n", async2);
 
     IDirectPlay8Address_Release(local);
     IDirectPlay8Address_Release(host);
@@ -341,36 +341,36 @@ static void test_enum_hosts_sync(void)
     appdesc.guidApplication  = appguid;
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&local);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&host);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost),
                                                          DPNA_DATATYPE_STRING);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     handlecnt = 0;
     lastAsyncCode = 0xdeadbeef;
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, 3, 1500, 1000,
                                         NULL,  NULL, DPNENUMHOSTS_SYNC);
-    ok(hr == DPN_OK, "got 0x%08x\n", hr);
-    ok(lastAsyncCode == 0xdeadbeef, "got 0x%08x\n", lastAsyncCode);
+    ok(hr == DPN_OK, "got 0x%08lx\n", hr);
+    ok(lastAsyncCode == 0xdeadbeef, "got 0x%08lx\n", lastAsyncCode);
     todo_wine ok(handlecnt == 2, "message handler not called\n");
 
     size = sizeof(port);
     hr = IDirectPlay8Address_GetComponentByName(host, DPNA_KEY_PORT, &port, &size, &type);
-    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
     size = sizeof(port);
     hr = IDirectPlay8Address_GetComponentByName(local, DPNA_KEY_PORT, &port, &size, &type);
-    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
     /* Try with specific port */
     port = 5445;
@@ -379,11 +379,11 @@ static void test_enum_hosts_sync(void)
 
     handlecnt = 0;
     lastAsyncCode = 0xbeefdead;
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, 1, 1500, 1000,
                                         NULL,  NULL, DPNENUMHOSTS_SYNC);
-    ok(hr == DPN_OK, "got 0x%08x\n", hr);
-    ok(lastAsyncCode == 0xbeefdead, "got 0x%08x\n", lastAsyncCode);
+    ok(hr == DPN_OK, "got 0x%08lx\n", hr);
+    ok(lastAsyncCode == 0xbeefdead, "got 0x%08lx\n", lastAsyncCode);
     ok(handlecnt == 0, "message handler called\n");
 
     IDirectPlay8Address_Release(local);
@@ -398,26 +398,26 @@ static void test_get_sp_caps(void)
     memset(&caps, 0, sizeof(DPN_SP_CAPS));
 
     hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %lx\n", hr);
 
     caps.dwSize = sizeof(DPN_SP_CAPS);
 
     hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr);
+    ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
 
-    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize);
+    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize);
     ok((caps.dwFlags &
         (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS)) ==
        (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS),
-       "unexpected flags %x\n", caps.dwFlags);
-    ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads);
-    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount);
-    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval);
-    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout);
-    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize);
-    ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread);
+       "unexpected flags %lx\n", caps.dwFlags);
+    ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads);
+    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount);
+    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval);
+    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout);
+    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize);
+    ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread);
     ok(caps.dwSystemBufferSize == 0x10000 || broken(caps.dwSystemBufferSize == 0x2000 /* before Win8 */),
-       "expected 0x10000, got 0x%x\n", caps.dwSystemBufferSize);
+       "expected 0x10000, got 0x%lx\n", caps.dwSystemBufferSize);
 
     caps.dwNumThreads = 2;
     caps.dwDefaultEnumCount = 3;
@@ -427,24 +427,24 @@ static void test_get_sp_caps(void)
     caps.dwBuffersPerThread = 2;
     caps.dwSystemBufferSize = 0x0ffff;
     hr = IDirectPlay8Client_SetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "SetSPCaps failed with %x\n", hr);
+    ok(hr == DPN_OK, "SetSPCaps failed with %lx\n", hr);
 
     hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr);
+    ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
 
-    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize);
-    ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads);
-    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount);
-    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval);
-    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout);
-    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize);
-    ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread);
-    ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%x\n", caps.dwSystemBufferSize);
+    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize);
+    ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads);
+    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount);
+    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval);
+    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout);
+    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize);
+    ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread);
+    ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%lx\n", caps.dwSystemBufferSize);
 
     /* Reset the System setting back to its default. */
     caps.dwSystemBufferSize = 0x10000;
     hr = IDirectPlay8Client_SetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "SetSPCaps failed with %x\n", hr);
+    ok(hr == DPN_OK, "SetSPCaps failed with %lx\n", hr);
 }
 
 static void test_lobbyclient(void)
@@ -457,13 +457,13 @@ static void test_lobbyclient(void)
     if(SUCCEEDED(hr))
     {
         hr = IDirectPlay8LobbyClient_Initialize(client, NULL, NULL, 0);
-        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+        ok(hr == E_POINTER, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8LobbyClient_Initialize(client, NULL, DirectPlayLobbyClientMessageHandler, 0);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8LobbyClient_Close(client, 0);
-        todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+        todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         IDirectPlay8LobbyClient_Release(client);
     }
@@ -482,48 +482,48 @@ static void test_player_info(void)
     info.dwInfoFlags = DPNINFO_NAME;
 
     hr = IDirectPlay8Client_SetClientInfo(client, NULL, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == E_POINTER, "got %x\n", hr);
+    ok(hr == E_POINTER, "got %lx\n", hr);
 
     info.pwszName = NULL;
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.pwszName = name;
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_NAME;
     info.pwszName = name2;
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_DATA;
     info.pwszName = NULL;
     info.pvData = NULL;
     info.dwDataSize = sizeof(data);
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == E_POINTER, "got %x\n", hr);
+    ok(hr == E_POINTER, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_DATA;
     info.pwszName = NULL;
     info.pvData = data;
     info.dwDataSize = 0;
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_DATA;
     info.pwszName = NULL;
     info.pvData = data;
     info.dwDataSize = sizeof(data);
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME;
     info.pwszName = name;
     info.pvData = data;
     info.dwDataSize = sizeof(data);
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     /* Leave ClientInfo with only the name set. */
     info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME;
@@ -531,7 +531,7 @@ static void test_player_info(void)
     info.pvData = NULL;
     info.dwDataSize = 0;
     hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 }
 
 static void test_cleanup_dp(void)
@@ -539,12 +539,12 @@ static void test_cleanup_dp(void)
     HRESULT hr;
 
     hr = IDirectPlay8Client_Close(client, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_Close failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_Close failed with %lx\n", hr);
 
     if(lobbied)
     {
         hr = IDirectPlay8LobbiedApplication_Close(lobbied, 0);
-        ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %x\n", hr);
+        ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %lx\n", hr);
 
         IDirectPlay8LobbiedApplication_Release(lobbied);
     }
@@ -559,22 +559,22 @@ static void test_close(void)
     DPN_SP_CAPS caps;
 
     hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client2);
-    ok(hr == S_OK, "got 0x%x\n", hr);
+    ok(hr == S_OK, "got 0x%lx\n", hr);
 
     memset(&caps, 0, sizeof(DPN_SP_CAPS));
     caps.dwSize = sizeof(DPN_SP_CAPS);
 
     hr = IDirectPlay8Client_Initialize(client2, NULL, DirectPlayMessageHandler, 0);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     hr = IDirectPlay8Client_GetSPCaps(client2, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "got %x\n", hr);
+    ok(hr == DPN_OK, "got %lx\n", hr);
 
     hr = IDirectPlay8Client_Close(client2, 0);
-    ok(hr == DPN_OK, "got %x\n", hr);
+    ok(hr == DPN_OK, "got %lx\n", hr);
 
     hr = IDirectPlay8Client_GetSPCaps(client2, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "got %lx\n", hr);
 
     IDirectPlay8Client_Release(client2);
 }
@@ -586,34 +586,34 @@ static void test_init_dp_peer(void)
     DPNHANDLE lobbyConnection;
 
     hr = CoCreateInstance(&CLSID_DirectPlay8Peer, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Peer, (void **)&peer);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     memset(&caps, 0, sizeof(DPN_SP_CAPS));
     caps.dwSize = sizeof(DPN_SP_CAPS);
 
     hr = IDirectPlay8Peer_SetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %lx\n", hr);
 
     hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %lx\n", hr);
 
     hr = IDirectPlay8Peer_Initialize(peer, NULL, NULL, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "got %x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "got %lx\n", hr);
 
     hr = IDirectPlay8Peer_Initialize(peer, NULL, DirectPlayMessageHandler, 0);
-    ok(hr == S_OK, "IDirectPlay8Peer_Initialize failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Peer_Initialize failed with %lx\n", hr);
 
     hr = CoCreateInstance(&CLSID_DirectPlay8LobbiedApplication, NULL, CLSCTX_INPROC_SERVER,
                           &IID_IDirectPlay8LobbiedApplication, (void **)&lobbied);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     hr = IDirectPlay8LobbiedApplication_Initialize(lobbied, NULL, NULL,
                                                 &lobbyConnection, 0);
-    ok(hr == DPNERR_INVALIDPOINTER, "Failed with %x\n", hr);
+    ok(hr == DPNERR_INVALIDPOINTER, "Failed with %lx\n", hr);
 
     hr = IDirectPlay8LobbiedApplication_Initialize(lobbied, NULL, DirectPlayLobbyMessageHandler,
                                                 &lobbyConnection, 0);
-    ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %lx\n", hr);
 }
 
 static void test_enum_service_providers_peer(void)
@@ -627,22 +627,22 @@ static void test_enum_service_providers_peer(void)
     items = 0;
 
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, &size, NULL, 0);
-    ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
 
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, NULL, &items, 0);
-    ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
 
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, &size, &items, 0);
-    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
     ok(size != 0, "size is unexpectedly 0\n");
 
     serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
 
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
     ok(items != 0, "Found unexpectedly no service providers\n");
 
-    trace("number of items found: %d\n", items);
+    trace("number of items found: %ld\n", items);
 
     for (i=0;i<items;i++)
     {
@@ -656,13 +656,13 @@ static void test_enum_service_providers_peer(void)
     items = 0;
 
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0);
-    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
     ok(size != 0, "size is unexpectedly 0\n");
 
     serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
 
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
     ok(items != 0, "Found unexpectedly no adapter\n");
 
 
@@ -675,8 +675,8 @@ static void test_enum_service_providers_peer(void)
     /* Invalid GUID */
     items = 88;
     hr = IDirectPlay8Peer_EnumServiceProviders(peer, &appguid, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
-    ok(items == 88, "Found adapter %d\n", items);
+    ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
+    ok(items == 88, "Found adapter %ld\n", items);
 
     HeapFree(GetProcessHeap(), 0, serv_prov_info);
 }
@@ -698,42 +698,42 @@ static void test_enum_hosts_peer(void)
     appdesc.guidApplication  = appguid;
 
     hr = CoCreateInstance(&CLSID_DirectPlay8Peer, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Peer, (void **)&peer2);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&local);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&host);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost),
                                                          DPNA_DATATYPE_STRING);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumServiceProviders failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumServiceProviders failed with 0x%08lx\n", hr);
     todo_wine ok(async, "No Handle returned\n");
 
     hr = IDirectPlay8Peer_CancelAsyncOperation(peer, async, 0);
-    todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x\n", hr);
+    todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08lx\n", hr);
 
     /* No Initialize has been called on peer2. */
     hr = IDirectPlay8Peer_EnumHosts(peer2, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Peer_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Peer_EnumHosts failed with 0x%08lx\n", hr);
 
     /* Since we are running asynchronously, EnumHosts returns DPNSUCCESS_PENDING. */
     hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08lx\n", hr);
     todo_wine ok(async, "No Handle returned\n");
 
     hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async2, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08lx\n", hr);
     todo_wine ok(async2, "No Handle returned\n");
     todo_wine ok(async2 != async, "Same handle returned.\n");
 
@@ -742,16 +742,16 @@ static void test_enum_hosts_peer(void)
     lastAsyncCode = E_FAIL;
     lastAsyncHandle = 0xdeadbeef;
     hr = IDirectPlay8Peer_CancelAsyncOperation(peer, async, 0);
-    todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x\n", hr);
-    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode);
-    todo_wine ok(lastAsyncHandle == async, "got 0x%08x\n", async);
+    todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08lx\n", hr);
+    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode);
+    todo_wine ok(lastAsyncHandle == async, "got 0x%08lx\n", async);
 
     lastAsyncCode = E_FAIL;
     lastAsyncHandle = 0xdeadbeef;
     hr = IDirectPlay8Peer_CancelAsyncOperation(peer, async2, 0);
-    todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x\n", hr);
-    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode);
-    todo_wine ok(lastAsyncHandle == async2, "got 0x%08x\n", async2);
+    todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08lx\n", hr);
+    todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode);
+    todo_wine ok(lastAsyncHandle == async2, "got 0x%08lx\n", async2);
 
     IDirectPlay8Peer_Release(peer2);
     IDirectPlay8Address_Release(local);
@@ -771,36 +771,36 @@ static void test_enum_hosts_sync_peer(void)
     appdesc.guidApplication  = appguid;
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&local);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&host);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost),
                                                          DPNA_DATATYPE_STRING);
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
 
     handlecnt = 0;
     lastAsyncCode = 0xdeadbeef;
     hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, 3, 1500, 1000,
                                         NULL,  NULL, DPNENUMHOSTS_SYNC);
-    ok(hr == DPN_OK, "got 0x%08x\n", hr);
-    ok(lastAsyncCode == 0xdeadbeef, "got 0x%08x\n", lastAsyncCode);
+    ok(hr == DPN_OK, "got 0x%08lx\n", hr);
+    ok(lastAsyncCode == 0xdeadbeef, "got 0x%08lx\n", lastAsyncCode);
     todo_wine ok(handlecnt == 2, "wrong handle cnt\n");
 
     size = sizeof(port);
     hr = IDirectPlay8Address_GetComponentByName(host, DPNA_KEY_PORT, &port, &size, &type);
-    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
     size = sizeof(port);
     hr = IDirectPlay8Address_GetComponentByName(local, DPNA_KEY_PORT, &port, &size, &type);
-    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
 
     /* Try with specific port */
     port = 5445;
@@ -809,11 +809,11 @@ static void test_enum_hosts_sync_peer(void)
 
     handlecnt = 0;
     lastAsyncCode = 0xbeefdead;
-    ok(hr == S_OK, "Failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
     hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, 1, 1500, 1000,
                                         NULL,  NULL, DPNENUMHOSTS_SYNC);
-    ok(hr == DPN_OK, "got 0x%08x\n", hr);
-    ok(lastAsyncCode == 0xbeefdead, "got 0x%08x\n", lastAsyncCode);
+    ok(hr == DPN_OK, "got 0x%08lx\n", hr);
+    ok(lastAsyncCode == 0xbeefdead, "got 0x%08lx\n", lastAsyncCode);
     ok(handlecnt == 0, "message handler called\n");
 
     IDirectPlay8Address_Release(local);
@@ -828,26 +828,26 @@ static void test_get_sp_caps_peer(void)
     memset(&caps, 0, sizeof(DPN_SP_CAPS));
 
     hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %lx\n", hr);
 
     caps.dwSize = sizeof(DPN_SP_CAPS);
 
     hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr);
+    ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
 
-    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize);
+    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize);
     ok((caps.dwFlags &
         (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS)) ==
        (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS),
-       "unexpected flags %x\n", caps.dwFlags);
-    ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads);
-    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount);
-    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval);
-    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout);
-    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize);
-    ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread);
+       "unexpected flags %lx\n", caps.dwFlags);
+    ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads);
+    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount);
+    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval);
+    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout);
+    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize);
+    ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread);
     ok(caps.dwSystemBufferSize == 0x10000 || broken(caps.dwSystemBufferSize == 0x2000 /* before Win8 */),
-       "expected 0x10000, got 0x%x\n", caps.dwSystemBufferSize);
+       "expected 0x10000, got 0x%lx\n", caps.dwSystemBufferSize);
 
     caps.dwNumThreads = 2;
     caps.dwDefaultEnumCount = 3;
@@ -857,19 +857,19 @@ static void test_get_sp_caps_peer(void)
     caps.dwBuffersPerThread = 2;
     caps.dwSystemBufferSize = 0x0ffff;
     hr = IDirectPlay8Peer_SetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "SetSPCaps failed with %x\n", hr);
+    ok(hr == DPN_OK, "SetSPCaps failed with %lx\n", hr);
 
     hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0);
-    ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr);
-
-    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize);
-    ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads);
-    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount);
-    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval);
-    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout);
-    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize);
-    ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread);
-    ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%x\n", caps.dwSystemBufferSize);
+    ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
+
+    ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize);
+    ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads);
+    ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount);
+    ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval);
+    ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout);
+    ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize);
+    ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread);
+    ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%lx\n", caps.dwSystemBufferSize);
 }
 
 static void test_player_info_peer(void)
@@ -885,20 +885,20 @@ static void test_player_info_peer(void)
     info.dwInfoFlags = DPNINFO_NAME;
 
     hr = IDirectPlay8Peer_SetPeerInfo(peer, NULL, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == E_POINTER, "got %x\n", hr);
+    ok(hr == E_POINTER, "got %lx\n", hr);
 
     info.pwszName = NULL;
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.pwszName = name;
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_NAME;
     info.pwszName = name2;
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
 if(0) /* Crashes on windows */
 {
@@ -907,7 +907,7 @@ if(0) /* Crashes on windows */
     info.pvData = NULL;
     info.dwDataSize = sizeof(data);
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 }
 
     info.dwInfoFlags = DPNINFO_DATA;
@@ -915,21 +915,21 @@ if(0) /* Crashes on windows */
     info.pvData = data;
     info.dwDataSize = 0;
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_DATA;
     info.pwszName = NULL;
     info.pvData = data;
     info.dwDataSize = sizeof(data);
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME;
     info.pwszName = name;
     info.pvData = data;
     info.dwDataSize = sizeof(data);
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 
     /* Leave PeerInfo with only the name set. */
     info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME;
@@ -937,7 +937,7 @@ if(0) /* Crashes on windows */
     info.pvData = NULL;
     info.dwDataSize = 0;
     hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC);
-    ok(hr == S_OK, "got %x\n", hr);
+    ok(hr == S_OK, "got %lx\n", hr);
 }
 
 static void test_cleanup_dp_peer(void)
@@ -945,12 +945,12 @@ static void test_cleanup_dp_peer(void)
     HRESULT hr;
 
     hr = IDirectPlay8Peer_Close(peer, 0);
-    ok(hr == S_OK, "IDirectPlay8Peer_Close failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Peer_Close failed with %lx\n", hr);
 
     if(lobbied)
     {
         hr = IDirectPlay8LobbiedApplication_Close(lobbied, 0);
-        ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %x\n", hr);
+        ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %lx\n", hr);
 
         IDirectPlay8LobbiedApplication_Release(lobbied);
     }
@@ -988,13 +988,13 @@ START_TEST(client)
         hr = set_firewall(APP_ADD);
         if (hr != S_OK)
         {
-            skip("can't authorize app in firewall %08x\n", hr);
+            skip("can't authorize app in firewall %08lx\n", hr);
             return;
         }
     }
 
     hr = CoInitialize(0);
-    ok(hr == S_OK, "CoInitialize failed with %x\n", hr);
+    ok(hr == S_OK, "CoInitialize failed with %lx\n", hr);
 
     if (!test_init_dp())
         goto done;
@@ -1019,7 +1019,7 @@ START_TEST(client)
     test_cleanup_dp_peer();
 
     hr = IDirectPlay8Server_Close(server, 0);
-    todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+    todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
     IDirectPlay8Server_Release(server);
 
     CloseHandle(enumevent);
diff --git a/dlls/dpnet/tests/server.c b/dlls/dpnet/tests/server.c
index 3d59d746fba..94a9da0d47f 100644
--- a/dlls/dpnet/tests/server.c
+++ b/dlls/dpnet/tests/server.c
@@ -35,7 +35,7 @@ static BOOL nDestroyPlayer;
 
 static HRESULT WINAPI DirectPlayMessageHandler(PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer)
 {
-    trace("msgid: 0x%08x\n", dwMessageId);
+    trace("msgid: 0x%08lx\n", dwMessageId);
 
     switch(dwMessageId)
     {
@@ -60,13 +60,13 @@ static void create_server(void)
     if( SUCCEEDED(hr)  )
     {
         hr = IDirectPlay8Server_Close(server, 0);
-        todo_wine ok(hr == DPNERR_UNINITIALIZED, "got 0x%08x\n", hr);
+        todo_wine ok(hr == DPNERR_UNINITIALIZED, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Server_Initialize(server, NULL, NULL, 0);
-        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+        ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
         if(hr == S_OK)
         {
             IDirectPlay8Address *localaddr = NULL;
@@ -76,7 +76,7 @@ static void create_server(void)
             ok(hr == S_OK, "Failed to create IDirectPlay8Address object\n");
 
             hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP);
-            ok(hr == S_OK, "got 0x%08x\n", hr);
+            ok(hr == S_OK, "got 0x%08lx\n", hr);
 
             memset( &appdesc, 0, sizeof(DPN_APPLICATION_DESC) );
             appdesc.dwSize  = sizeof( DPN_APPLICATION_DESC );
@@ -85,13 +85,13 @@ static void create_server(void)
             appdesc.pwszSessionName  = sessionname;
 
             hr = IDirectPlay8Server_Host(server, &appdesc, &localaddr, 1, NULL, NULL, NULL, 0);
-            todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+            todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
 
             todo_wine ok(nCreatePlayer, "No DPN_MSGID_CREATE_PLAYER Message\n");
             ok(!nDestroyPlayer, "Received DPN_MSGID_DESTROY_PLAYER Message\n");
 
             hr = IDirectPlay8Server_Close(server, 0);
-            todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+            todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
 
             todo_wine ok(nDestroyPlayer, "No DPN_MSGID_DESTROY_PLAYER Message\n");
 
@@ -120,65 +120,65 @@ static void test_server_info(void)
         info.dwInfoFlags = DPNINFO_NAME;
 
         hr = IDirectPlay8Server_SetServerInfo(server, NULL, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == E_POINTER, "got %x\n", hr);
+        ok(hr == E_POINTER, "got %lx\n", hr);
 
         info.pwszName = name;
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr);
+        ok(hr == DPNERR_UNINITIALIZED, "got %lx\n", hr);
 
         hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0);
-        ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08lx\n", hr);
 
         hr = IDirectPlay8Server_SetServerInfo(server, NULL, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == E_POINTER, "got %x\n", hr);
+        ok(hr == E_POINTER, "got %lx\n", hr);
 
         info.pwszName = NULL;
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         info.pwszName = name;
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         info.dwInfoFlags = DPNINFO_NAME;
         info.pwszName = name2;
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         info.dwInfoFlags = DPNINFO_DATA;
         info.pwszName = NULL;
         info.pvData = NULL;
         info.dwDataSize = sizeof(data);
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == E_POINTER, "got %x\n", hr);
+        ok(hr == E_POINTER, "got %lx\n", hr);
 
         info.dwInfoFlags = DPNINFO_DATA;
         info.pwszName = NULL;
         info.pvData = data;
         info.dwDataSize = 0;
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         info.dwInfoFlags = DPNINFO_DATA;
         info.pwszName = NULL;
         info.pvData = data;
         info.dwDataSize = sizeof(data);
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME;
         info.pwszName = name;
         info.pvData = data;
         info.dwDataSize = sizeof(data);
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME;
         info.pwszName = name;
         info.pvData = NULL;
         info.dwDataSize = 0;
         hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC);
-        ok(hr == S_OK, "got %x\n", hr);
+        ok(hr == S_OK, "got %lx\n", hr);
 
         IDirectPlay8Server_Release(server);
     }
@@ -200,10 +200,10 @@ static void test_enum_service_providers(void)
     size = 0;
     items = 0;
     hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "got %lx\n", hr);
 
     hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         IDirectPlay8Server_Release(server);
@@ -214,22 +214,22 @@ static void test_enum_service_providers(void)
     items = 0;
 
     hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, NULL, 0);
-    ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
 
     hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, NULL, &items, 0);
-    ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
 
     hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, &items, 0);
-    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
     ok(size != 0, "size is unexpectedly 0\n");
 
     serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
 
     hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
     ok(items != 0, "Found unexpectedly no service providers\n");
 
-    trace("number of items found: %d\n", items);
+    trace("number of items found: %ld\n", items);
 
     for (i=0;i<items;i++)
     {
@@ -243,13 +243,13 @@ static void test_enum_service_providers(void)
     items = 0;
 
     hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0);
-    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
     ok(size != 0, "size is unexpectedly 0\n");
 
     serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
 
     hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
     ok(items != 0, "Found unexpectedly no adapter\n");
 
 
@@ -262,8 +262,8 @@ static void test_enum_service_providers(void)
     /* Invalid GUID */
     items = 88;
     hr = IDirectPlay8Server_EnumServiceProviders(server, &appguid, NULL, serv_prov_info, &size, &items, 0);
-    ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
-    ok(items == 88, "Found adapter %d\n", items);
+    ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
+    ok(items == 88, "Found adapter %ld\n", items);
 
     HeapFree(GetProcessHeap(), 0, serv_prov_info);
     IDirectPlay8Server_Release(server);
@@ -297,18 +297,18 @@ BOOL is_firewall_enabled(void)
 
     hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
                            (void **)&mgr );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
     if (hr != S_OK) goto done;
 
     hr = INetFwProfile_get_FirewallEnabled( profile, &enabled );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
 
 done:
     if (policy) INetFwPolicy_Release( policy );
@@ -346,23 +346,23 @@ HRESULT set_firewall( enum firewall_op op )
 
     hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
                            (void **)&mgr );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
     if (hr != S_OK) goto done;
 
     hr = INetFwProfile_get_AuthorizedApplications( profile, &apps );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER,
                            &IID_INetFwAuthorizedApplication, (void **)&app );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
@@ -371,7 +371,7 @@ HRESULT set_firewall( enum firewall_op op )
     name = SysAllocString( L"dpnet_client" );
     hr = INetFwAuthorizedApplication_put_Name( app, name );
     SysFreeString( name );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     if (op == APP_ADD)
@@ -385,7 +385,7 @@ HRESULT set_firewall( enum firewall_op op )
     INetFwAuthorizedApplication_Release( app );
     hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER,
                            &IID_INetFwAuthorizedApplication, (void **)&app );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     SysFreeString( image );
@@ -396,7 +396,7 @@ HRESULT set_firewall( enum firewall_op op )
     name = SysAllocString( L"dpnet_server" );
     hr = INetFwAuthorizedApplication_put_Name( app, name );
     SysFreeString( name );
-    ok( hr == S_OK, "got %08x\n", hr );
+    ok( hr == S_OK, "got %08lx\n", hr );
     if (hr != S_OK) goto done;
 
     if (op == APP_ADD)
@@ -472,7 +472,7 @@ START_TEST(server)
         HRESULT hr = set_firewall(APP_ADD);
         if (hr != S_OK)
         {
-            skip("can't authorize app in firewall %08x\n", hr);
+            skip("can't authorize app in firewall %08lx\n", hr);
             return;
         }
     }
diff --git a/dlls/dpnet/tests/thread.c b/dlls/dpnet/tests/thread.c
index d681abded91..76d71b8f940 100644
--- a/dlls/dpnet/tests/thread.c
+++ b/dlls/dpnet/tests/thread.c
@@ -46,7 +46,7 @@ static HRESULT WINAPI DirectPlayThreadHandler(void *context, DWORD message_id, v
                 SetEvent(enumevent);
             break;
         default:
-            trace("DirectPlayThreadHandler: 0x%08x\n", message_id);
+            trace("DirectPlayThreadHandler: 0x%08lx\n", message_id);
     }
     return S_OK;
 }
@@ -59,52 +59,52 @@ static void create_threadpool(void)
     DWORD threadcnt = 10;
 
     hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool1);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool2);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, NULL, 0);
-    ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Initialize(pool2, NULL, &DirectPlayThreadHandler, 0);
-    ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    ok(threadcnt == 0, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    ok(threadcnt == 0, "got %ld\n", threadcnt);
 
     hr = IDirectPlay8ThreadPool_SetThreadCount(pool1, -1, 5, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    todo_wine ok(cnt_thread_create == 5, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    todo_wine ok(cnt_thread_create == 5, "got %ld\n", threadcnt);
 
     hr = IDirectPlay8ThreadPool_SetThreadCount(pool2, -1, 5, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    todo_wine ok(cnt_thread_create == 5, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    todo_wine ok(cnt_thread_create == 5, "got %ld\n", threadcnt);
 
     /* Thead count must be zero before DoWork can be called. */
     hr = IDirectPlay8ThreadPool_DoWork(pool1, 100, 0);
-    todo_wine ok(hr == DPNERR_NOTREADY, "got 0x%08x\n", hr);
+    todo_wine ok(hr == DPNERR_NOTREADY, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    todo_wine ok(threadcnt == 5, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    todo_wine ok(threadcnt == 5, "got %ld\n", threadcnt);
 
     hr = IDirectPlay8ThreadPool_SetThreadCount(pool1, -1, 0, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    todo_wine ok(cnt_thread_destroy == 5, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    todo_wine ok(cnt_thread_destroy == 5, "got %ld\n", threadcnt);
 
     hr = IDirectPlay8ThreadPool_DoWork(pool1, 100, 0);
-    ok(hr == DPN_OK, "got 0x%08x\n", hr);
+    ok(hr == DPN_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Close(pool1, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Close(pool2, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "got 0x%08lx\n", hr);
 
     IDirectPlay8ThreadPool_Release(pool1);
     IDirectPlay8ThreadPool_Release(pool2);
@@ -128,81 +128,81 @@ static void test_enum_hosts(void)
     appdesc.guidApplication  = appguid;
 
     hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool1);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0);
-    ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    ok(threadcnt == 0, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    ok(threadcnt == 0, "got %ld\n", threadcnt);
 
     hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client);
-    ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr);
+    ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
 
     hr = IDirectPlay8Client_Initialize(client, NULL, DirectPlayThreadHandler, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    todo_wine ok(threadcnt == 1, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    todo_wine ok(threadcnt == 1, "got %ld\n", threadcnt);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&local);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&host);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP);
-    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, L"127.0.0.1", sizeof(L"127.0.0.1"),
                                           DPNA_DATATYPE_STRING);
-    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
     todo_wine ok(async, "No Handle returned\n");
 
     /* The first EnumHosts call will increase the thread count */
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadorig, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    todo_wine ok(threadorig > 1, "got %d\n", threadorig);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    todo_wine ok(threadorig > 1, "got %ld\n", threadorig);
 
     hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL,  &async2, 0);
-    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr);
+    ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
 
     WaitForSingleObject(enumevent, 1000);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    ok(threadcnt == threadorig, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    ok(threadcnt == threadorig, "got %ld\n", threadcnt);
 
     hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    ok(threadcnt == threadorig, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    ok(threadcnt == threadorig, "got %ld\n", threadcnt);
 
     hr = IDirectPlay8Client_CancelAsyncOperation(client, async2, 0);
-    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr);
+    ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
-    ok(threadcnt == threadorig, "got %d\n", threadcnt);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
+    ok(threadcnt == threadorig, "got %ld\n", threadcnt);
 
     IDirectPlay8Address_Release(local);
     IDirectPlay8Address_Release(host);
 
     hr = IDirectPlay8ThreadPool_Close(pool1, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     IDirectPlay8Client_Release(client);
     IDirectPlay8ThreadPool_Release(pool1);
@@ -216,23 +216,23 @@ static void test_singleton(void)
     IDirectPlay8ThreadPool *pool1, *pool2;
 
     hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool1);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool2);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
     ok(pool1 != pool2, "same pointer returned.\n");
 
     hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Initialize(pool2, NULL, &DirectPlayThreadHandler, 0);
-    ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Close(pool1, 0);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
 
     hr = IDirectPlay8ThreadPool_Close(pool2, 0);
-    ok(hr == DPNERR_UNINITIALIZED, "got 0x%08x\n", hr);
+    ok(hr == DPNERR_UNINITIALIZED, "got 0x%08lx\n", hr);
 
     IDirectPlay8ThreadPool_Release(pool1);
     IDirectPlay8ThreadPool_Release(pool2);
@@ -268,7 +268,7 @@ START_TEST(thread)
         HRESULT hr = set_firewall(APP_ADD);
         if (hr != S_OK)
         {
-            skip("can't authorize app in firewall %08x\n", hr);
+            skip("can't authorize app in firewall %08lx\n", hr);
             return;
         }
     }




More information about the wine-devel mailing list