[PATCH 09/27] dlls/hlink/tests: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Mon Feb 28 01:26:08 CST 2022


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

---
 dlls/hlink/tests/Makefile.in  |    1 
 dlls/hlink/tests/browse_ctx.c |   52 +++---
 dlls/hlink/tests/hlink.c      |  368 +++++++++++++++++++++--------------------
 3 files changed, 210 insertions(+), 211 deletions(-)

diff --git a/dlls/hlink/tests/Makefile.in b/dlls/hlink/tests/Makefile.in
index 03a6534f891..f5344d6f2d7 100644
--- a/dlls/hlink/tests/Makefile.in
+++ b/dlls/hlink/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 TESTDLL   = hlink.dll
 IMPORTS   = hlink ole32
 
diff --git a/dlls/hlink/tests/browse_ctx.c b/dlls/hlink/tests/browse_ctx.c
index 95a72d77722..c0a731bb334 100644
--- a/dlls/hlink/tests/browse_ctx.c
+++ b/dlls/hlink/tests/browse_ctx.c
@@ -36,41 +36,41 @@ static void test_SetInitialHlink(void)
     HRESULT hres;
 
     hres = CreateBindCtx(0, &bindctx);
-    ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateBindCtx failed: 0x%08lx\n", hres);
 
     hres = CreateItemMoniker(one, five, &dummy);
-    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08lx\n", hres);
 
     hres = IMoniker_GetDisplayName(dummy, bindctx, NULL, &exp_name);
-    ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: 0x%08lx\n", hres);
 
     hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc);
-    ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, one, NULL);
-    ok(hres == S_OK, "SetInitialHlink failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "SetInitialHlink failed: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, one, NULL);
-    ok(hres == CO_E_ALREADYINITIALIZED, "got 0x%08x\n", hres);
+    ok(hres == CO_E_ALREADYINITIALIZED, "got 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, five, NULL);
-    ok(hres == CO_E_ALREADYINITIALIZED, "got 0x%08x\n", hres);
+    ok(hres == CO_E_ALREADYINITIALIZED, "got 0x%08lx\n", hres);
 
     /* there's only one */
     hres = IHlinkBrowseContext_GetHlink(bc, HLID_PREVIOUS, &found_hlink);
-    ok(hres == E_FAIL, "got 0x%08x\n", hres);
+    ok(hres == E_FAIL, "got 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_GetHlink(bc, HLID_NEXT, &found_hlink);
-    ok(hres == E_FAIL, "got 0x%08x\n", hres);
+    ok(hres == E_FAIL, "got 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_GetHlink(bc, HLID_CURRENT, &found_hlink);
-    ok(hres == S_OK, "GetHlink failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "GetHlink failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(found_hlink, HLINKGETREF_DEFAULT, &found_moniker, NULL);
-    ok(hres == S_OK, "GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "GetMonikerReference failed: 0x%08lx\n", hres);
 
     hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name);
-    ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: 0x%08lx\n", hres);
     ok(!lstrcmpW(found_name, exp_name), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(exp_name), wine_dbgstr_w(found_name));
 
     CoTaskMemFree(exp_name);
@@ -90,19 +90,19 @@ static void test_BrowseWindowInfo(void)
     HRESULT hres;
 
     hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc);
-    ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, NULL);
-    ok(hres == E_INVALIDARG, "GetBrowseWindow failed with wrong code: 0x%08x\n", hres);
+    ok(hres == E_INVALIDARG, "GetBrowseWindow failed with wrong code: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_SetBrowseWindowInfo(bc, NULL);
-    ok(hres == E_INVALIDARG, "SetBrowseWindow failed with wrong code: 0x%08x\n", hres);
+    ok(hres == E_INVALIDARG, "SetBrowseWindow failed with wrong code: 0x%08lx\n", hres);
 
     memset(&bwinfo_get, -1, sizeof(HLBWINFO));
 
     hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get);
-    ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres);
-    ok(bwinfo_get.cbSize == 0, "Got wrong size: %x\n", bwinfo_get.cbSize);
+    ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08lx\n", hres);
+    ok(bwinfo_get.cbSize == 0, "Got wrong size: %lx\n", bwinfo_get.cbSize);
 
     bwinfo_set.cbSize = sizeof(HLBWINFO);
     bwinfo_set.grfHLBWIF = HLBWIF_WEBTOOLBARHIDDEN;
@@ -120,12 +120,12 @@ static void test_BrowseWindowInfo(void)
     bwinfo_set.hltbinfo.rcTbPos.top = 11;
     bwinfo_set.hltbinfo.rcTbPos.bottom = 12;
     hres = IHlinkBrowseContext_SetBrowseWindowInfo(bc, &bwinfo_set);
-    ok(hres == S_OK, "SetBrowseWindowInfo failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "SetBrowseWindowInfo failed: 0x%08lx\n", hres);
 
     memset(&bwinfo_get, 0, sizeof(HLBWINFO));
 
     hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get);
-    ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08lx\n", hres);
     ok(!memcmp(&bwinfo_set, &bwinfo_get, sizeof(HLBWINFO)), "Set and Get differ\n");
 
     IHlinkBrowseContext_Release(bc);
@@ -172,26 +172,26 @@ static void test_GetObject(void)
     HRESULT hres;
 
     hres = CreateItemMoniker(one, five, &dummy);
-    ok(hres == S_OK, "CreateItemMoniker() failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateItemMoniker() failed: 0x%08lx\n", hres);
 
     hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void **)&bc);
-    ok(hres == S_OK, "HlinkCreateBrowseContext() failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateBrowseContext() failed: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_GetObject(bc, dummy, FALSE, &unk);
-    ok(hres == MK_E_UNAVAILABLE, "expected MK_E_UNAVAILABLE, got 0x%08x\n", hres);
+    ok(hres == MK_E_UNAVAILABLE, "expected MK_E_UNAVAILABLE, got 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_Register(bc, 0, &Unknown, dummy, &cookie);
-    ok(hres == S_OK, "Register() failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "Register() failed: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_GetObject(bc, dummy, FALSE, &unk);
-    ok(hres == S_OK, "GetObject() failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "GetObject() failed: 0x%08lx\n", hres);
     ok(unk == &Unknown, "wrong object returned\n");
 
     hres = IHlinkBrowseContext_Revoke(bc, cookie);
-    ok(hres == S_OK, "Revoke() failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "Revoke() failed: 0x%08lx\n", hres);
 
     hres = IHlinkBrowseContext_GetObject(bc, dummy, FALSE, &unk);
-    ok(hres == MK_E_UNAVAILABLE, "expected MK_E_UNAVAILABLE, got 0x%08x\n", hres);
+    ok(hres == MK_E_UNAVAILABLE, "expected MK_E_UNAVAILABLE, got 0x%08lx\n", hres);
 
     IHlinkBrowseContext_Release(bc);
     IMoniker_Release(dummy);
diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c
index 1d2c530b52d..984f952c158 100644
--- a/dlls/hlink/tests/hlink.c
+++ b/dlls/hlink/tests/hlink.c
@@ -129,7 +129,7 @@ static void test_HlinkIsShortcut(void)
 
     for (i=0; i < ARRAY_SIZE(shortcut_test); i++) {
         hres = HlinkIsShortcut(shortcut_test[i].file);
-        ok(hres == shortcut_test[i].hres, "[%d] HlinkIsShortcut returned %08x, expected %08x\n",
+        ok(hres == shortcut_test[i].hres, "[%d] HlinkIsShortcut returned %08lx, expected %08lx\n",
            i, hres, shortcut_test[i].hres);
     }
 }
@@ -165,10 +165,10 @@ static void test_reference(void)
     CoTaskMemFree(str);
 
     r = IHlink_GetStringReference(lnk, -1, NULL, NULL);
-    ok(r == S_OK, "failed, r=%08x\n", r);
+    ok(r == S_OK, "failed, r=%08lx\n", r);
 
     r = IHlink_GetStringReference(lnk, -1, NULL, &str);
-    ok(r == S_OK, "failed, r=%08x\n", r);
+    ok(r == S_OK, "failed, r=%08lx\n", r);
     ok(str == NULL, "string should be null\n");
 
     r = IHlink_GetStringReference(lnk, HLINKGETREF_DEFAULT, &str, NULL);
@@ -378,16 +378,16 @@ static void test_persist_save_data(const char *testname, IHlink *lnk,
     BOOL same;
 
     hr = IHlink_QueryInterface(lnk, &IID_IPersistStream, (void **)&ps);
-    ok(hr == S_OK, "IHlink_QueryInterface failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "IHlink_QueryInterface failed with error 0x%08lx\n", hr);
 
     hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
-    ok(hr == S_OK, "CreateStreamOnHGlobal failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "CreateStreamOnHGlobal failed with error 0x%08lx\n", hr);
 
     hr = IPersistStream_Save(ps, stream, TRUE);
-    ok(hr == S_OK, "IPersistStream_Save failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "IPersistStream_Save failed with error 0x%08lx\n", hr);
 
     hr = GetHGlobalFromStream(stream, &hglobal);
-    ok(hr == S_OK, "GetHGlobalFromStream failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "GetHGlobalFromStream failed with error 0x%08lx\n", hr);
 
     data_size = GlobalSize(hglobal);
 
@@ -396,7 +396,7 @@ static void test_persist_save_data(const char *testname, IHlink *lnk,
     /* first check we have the right amount of data */
     ok((data_size == expected_data_size) ||
        (data_size == expected_data_alt_size),
-       "%s: Size of saved data differs (expected %d or %d, actual %d)\n",
+       "%s: Size of saved data differs (expected %d or %d, actual %ld)\n",
        testname, expected_data_size, expected_data_alt_size, data_size);
 
     same = TRUE;
@@ -470,7 +470,7 @@ static void test_persist(void)
 
     hr = HlinkCreateFromString(url, NULL, NULL, NULL,
                                0, NULL, &IID_IHlink, (LPVOID*) &lnk);
-    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08lx\n", hr);
     if (!lnk) {
         skip("Can't create lnk, skipping test_persist.\n");
         return;
@@ -482,7 +482,7 @@ static void test_persist(void)
 
     hr = HlinkCreateFromString(url, NULL, friendly_name, NULL,
                                0, NULL, &IID_IHlink, (LPVOID*) &lnk);
-    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08lx\n", hr);
     test_persist_save_data("url + friendly name", lnk,
         expected_hlink_data2, sizeof(expected_hlink_data2),
         expected_hlink_data2_ie7, sizeof(expected_hlink_data2_ie7));
@@ -490,7 +490,7 @@ static void test_persist(void)
 
     hr = HlinkCreateFromString(url, location, friendly_name, NULL,
                                0, NULL, &IID_IHlink, (LPVOID*) &lnk);
-    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08lx\n", hr);
     test_persist_save_data("url + friendly_name + location", lnk,
         expected_hlink_data3, sizeof(expected_hlink_data3),
         expected_hlink_data3_ie7, sizeof(expected_hlink_data3_ie7));
@@ -498,7 +498,7 @@ static void test_persist(void)
 
     hr = HlinkCreateFromString(rel_url, NULL, NULL, NULL,
                                0, NULL, &IID_IHlink, (LPVOID*) &lnk);
-    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08lx\n", hr);
     test_persist_save_data("relative url", lnk,
         expected_hlink_data4, sizeof(expected_hlink_data4),
         expected_hlink_data4, sizeof(expected_hlink_data4));
@@ -506,9 +506,9 @@ static void test_persist(void)
 
     hr = HlinkCreateFromString(url, NULL, NULL, NULL,
                                0, NULL, &IID_IHlink, (LPVOID*) &lnk);
-    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08lx\n", hr);
     hr = IHlink_SetTargetFrameName(lnk, target_frame_name);
-    ok(hr == S_OK, "IHlink_SetTargetFrameName failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "IHlink_SetTargetFrameName failed with error 0x%08lx\n", hr);
     test_persist_save_data("url + target frame name", lnk,
         expected_hlink_data5, sizeof(expected_hlink_data5),
         expected_hlink_data5_ie7, sizeof(expected_hlink_data5_ie7));
@@ -516,7 +516,7 @@ static void test_persist(void)
 
     hr = HlinkCreateFromString(filename, NULL, NULL, NULL,
                                0, NULL, &IID_IHlink, (LPVOID*) &lnk);
-    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr);
+    ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08lx\n", hr);
     test_persist_save_data("filename", lnk,
         expected_hlink_data6, sizeof(expected_hlink_data6),
         expected_hlink_data6, sizeof(expected_hlink_data6));
@@ -529,23 +529,23 @@ static void test_special_reference(void)
     HRESULT hres;
 
     hres = HlinkGetSpecialReference(HLSR_HOME, &ref);
-    ok(hres == S_OK, "HlinkGetSpecialReference(HLSR_HOME) failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkGetSpecialReference(HLSR_HOME) failed: %08lx\n", hres);
     ok(ref != NULL, "ref == NULL\n");
     CoTaskMemFree(ref);
 
     hres = HlinkGetSpecialReference(HLSR_SEARCHPAGE, &ref);
-    ok(hres == S_OK, "HlinkGetSpecialReference(HLSR_SEARCHPAGE) failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkGetSpecialReference(HLSR_SEARCHPAGE) failed: %08lx\n", hres);
     ok(ref != NULL, "ref == NULL\n");
     CoTaskMemFree(ref);
 
     ref = (void*)0xdeadbeef;
     hres = HlinkGetSpecialReference(HLSR_HISTORYFOLDER, &ref);
-    ok(hres == E_NOTIMPL, "HlinkGetSpecialReference(HLSR_HISTORYFOLDER) failed: %08x\n", hres);
+    ok(hres == E_NOTIMPL, "HlinkGetSpecialReference(HLSR_HISTORYFOLDER) failed: %08lx\n", hres);
     ok(ref == NULL, "ref=%p\n", ref);
 
     ref = (void*)0xdeadbeef;
     hres = HlinkGetSpecialReference(4, &ref);
-    ok(hres == E_INVALIDARG, "HlinkGetSpecialReference(HLSR_HISTORYFOLDER) failed: %08x\n", hres);
+    ok(hres == E_INVALIDARG, "HlinkGetSpecialReference(HLSR_HISTORYFOLDER) failed: %08lx\n", hres);
     ok(ref == NULL, "ref=%p\n", ref);
 }
 
@@ -564,33 +564,33 @@ static void test_HlinkCreateExtensionServices(void)
 
     hres = HlinkCreateExtensionServices(NULL, NULL, NULL, NULL,
                                         NULL, &IID_IAuthenticate, (void**)&authenticate);
-    ok(hres == S_OK, "HlinkCreateExtensionServices failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateExtensionServices failed: %08lx\n", hres);
     ok(authenticate != NULL, "HlinkCreateExtensionServices returned NULL\n");
 
     password = username = (void*)0xdeadbeef;
     hwnd = (void*)0xdeadbeef;
     hres = IAuthenticate_Authenticate(authenticate, &hwnd, &username, &password);
-    ok(hres == S_OK, "Authenticate failed: %08x\n", hres);
+    ok(hres == S_OK, "Authenticate failed: %08lx\n", hres);
     ok(!hwnd, "hwnd != NULL\n");
     ok(!username, "username != NULL\n");
     ok(!password, "password != NULL\n");
 
     hres = IAuthenticate_QueryInterface(authenticate, &IID_IHttpNegotiate, (void**)&http_negotiate);
-    ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres);
+    ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08lx\n", hres);
 
     headers = (void*)0xdeadbeef;
     hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef,
                                                0, &headers);
-    ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres);
+    ok(hres == S_OK, "BeginningTransaction failed: %08lx\n", hres);
     ok(headers == NULL, "headers != NULL\n");
 
     hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef,
                                                0, NULL);
-    ok(hres == E_INVALIDARG, "BeginningTransaction failed: %08x, expected E_INVALIDARG\n", hres);
+    ok(hres == E_INVALIDARG, "BeginningTransaction failed: %08lx, expected E_INVALIDARG\n", hres);
 
     headers = (void*)0xdeadbeef;
     hres = IHttpNegotiate_OnResponse(http_negotiate, 200, (void*)0xdeadbeef, (void*)0xdeadbeef, &headers);
-    ok(hres == S_OK, "OnResponse failed: %08x\n", hres);
+    ok(hres == S_OK, "OnResponse failed: %08lx\n", hres);
     ok(headers == NULL, "headers != NULL\n");
 
     IHttpNegotiate_Release(http_negotiate);
@@ -599,13 +599,13 @@ static void test_HlinkCreateExtensionServices(void)
 
     hres = HlinkCreateExtensionServices(headersW, (HWND)0xfefefefe, usernameW, passwordW,
                                         NULL, &IID_IAuthenticate, (void**)&authenticate);
-    ok(hres == S_OK, "HlinkCreateExtensionServices failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateExtensionServices failed: %08lx\n", hres);
     ok(authenticate != NULL, "HlinkCreateExtensionServices returned NULL\n");
 
     password = username = NULL;
     hwnd = NULL;
     hres = IAuthenticate_Authenticate(authenticate, &hwnd, &username, &password);
-    ok(hres == S_OK, "Authenticate failed: %08x\n", hres);
+    ok(hres == S_OK, "Authenticate failed: %08lx\n", hres);
     ok(hwnd == (HWND)0xfefefefe, "hwnd=%p\n", hwnd);
     ok(!lstrcmpW(username, usernameW), "unexpected username\n");
     ok(!lstrcmpW(password, passwordW), "unexpected password\n");
@@ -615,23 +615,23 @@ static void test_HlinkCreateExtensionServices(void)
     password = username = (void*)0xdeadbeef;
     hwnd = (void*)0xdeadbeef;
     hres = IAuthenticate_Authenticate(authenticate, &hwnd, NULL, &password);
-    ok(hres == E_INVALIDARG, "Authenticate failed: %08x\n", hres);
+    ok(hres == E_INVALIDARG, "Authenticate failed: %08lx\n", hres);
     ok(password == (void*)0xdeadbeef, "password = %p\n", password);
     ok(hwnd == (void*)0xdeadbeef, "hwnd = %p\n", hwnd);
 
     hres = IAuthenticate_QueryInterface(authenticate, &IID_IHttpNegotiate, (void**)&http_negotiate);
-    ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres);
+    ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08lx\n", hres);
 
     headers = (void*)0xdeadbeef;
     hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef,
                                                0, &headers);
-    ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres);
+    ok(hres == S_OK, "BeginningTransaction failed: %08lx\n", hres);
     ok(!lstrcmpW(headers, headersexW), "unexpected headers %s\n", wine_dbgstr_w(headers));
     CoTaskMemFree(headers);
 
     headers = (void*)0xdeadbeef;
     hres = IHttpNegotiate_OnResponse(http_negotiate, 200, (void*)0xdeadbeef, (void*)0xdeadbeef, &headers);
-    ok(hres == S_OK, "OnResponse failed: %08x\n", hres);
+    ok(hres == S_OK, "OnResponse failed: %08lx\n", hres);
     ok(headers == NULL, "unexpected headers %s\n", wine_dbgstr_w(headers));
 
     IHttpNegotiate_Release(http_negotiate);
@@ -657,61 +657,61 @@ static void test_HlinkParseDisplayName(void)
     CreateBindCtx(0, &bctx);
 
     hres = HlinkParseDisplayName(bctx, winehq_urlW, FALSE, &eaten, &mon);
-    ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
-    ok(eaten == ARRAY_SIZE(winehq_urlW)-1, "eaten=%d\n", eaten);
+    ok(hres == S_OK, "HlinkParseDisplayName failed: %08lx\n", hres);
+    ok(eaten == ARRAY_SIZE(winehq_urlW)-1, "eaten=%ld\n", eaten);
     ok(mon != NULL, "mon == NULL\n");
 
     hres = IMoniker_GetDisplayName(mon, bctx, 0, &name);
-    ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres);
     ok(!lstrcmpW(name, winehq_urlW), "wrong display name %s\n", wine_dbgstr_w(name));
     CoTaskMemFree(name);
 
     hres = IMoniker_IsSystemMoniker(mon, &issys);
-    ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
-    ok(issys == MKSYS_URLMONIKER, "issys=%x\n", issys);
+    ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres);
+    ok(issys == MKSYS_URLMONIKER, "issys=%lx\n", issys);
 
     IMoniker_Release(mon);
 
     hres = HlinkParseDisplayName(bctx, clsid_nameW, FALSE, &eaten, &mon);
-    ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
-    ok(eaten == ARRAY_SIZE(clsid_nameW)-1, "eaten=%d\n", eaten);
+    ok(hres == S_OK, "HlinkParseDisplayName failed: %08lx\n", hres);
+    ok(eaten == ARRAY_SIZE(clsid_nameW)-1, "eaten=%ld\n", eaten);
     ok(mon != NULL, "mon == NULL\n");
 
     hres = IMoniker_IsSystemMoniker(mon, &issys);
-    ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
-    ok(issys == MKSYS_CLASSMONIKER, "issys=%x\n", issys);
+    ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres);
+    ok(issys == MKSYS_CLASSMONIKER, "issys=%lx\n", issys);
 
     IMoniker_Release(mon);
 
     hres = HlinkParseDisplayName(bctx, invalid_urlW, FALSE, &eaten, &mon);
-    ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
-    ok(eaten == ARRAY_SIZE(invalid_urlW)-1, "eaten=%d\n", eaten);
+    ok(hres == S_OK, "HlinkParseDisplayName failed: %08lx\n", hres);
+    ok(eaten == ARRAY_SIZE(invalid_urlW)-1, "eaten=%ld\n", eaten);
     ok(mon != NULL, "mon == NULL\n");
 
     hres = IMoniker_GetDisplayName(mon, bctx, 0, &name);
-    ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres);
     ok(!lstrcmpW(name, invalid_urlW), "wrong display name %s\n", wine_dbgstr_w(name));
     CoTaskMemFree(name);
 
     hres = IMoniker_IsSystemMoniker(mon, &issys);
-    ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
-    ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys);
+    ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres);
+    ok(issys == MKSYS_FILEMONIKER, "issys=%lx\n", issys);
 
     IMoniker_Release(mon);
 
     hres = HlinkParseDisplayName(bctx, file_urlW, FALSE, &eaten, &mon);
-    ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
-    ok(eaten == ARRAY_SIZE(file_urlW)-1, "eaten=%d\n", eaten);
+    ok(hres == S_OK, "HlinkParseDisplayName failed: %08lx\n", hres);
+    ok(eaten == ARRAY_SIZE(file_urlW)-1, "eaten=%ld\n", eaten);
     ok(mon != NULL, "mon == NULL\n");
 
     hres = IMoniker_GetDisplayName(mon, bctx, 0, &name);
-    ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres);
     ok(!lstrcmpW(name, file_urlW+8), "wrong display name %s\n", wine_dbgstr_w(name));
     CoTaskMemFree(name);
 
     hres = IMoniker_IsSystemMoniker(mon, &issys);
-    ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
-    ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys);
+    ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres);
+    ok(issys == MKSYS_FILEMONIKER, "issys=%lx\n", issys);
 
     IMoniker_Release(mon);
     IBindCtx_Release(bctx);
@@ -808,7 +808,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
 {
     CHECK_EXPECT(BindStatusCallback_OnStopBinding);
 
-    ok(hr == S_OK, "got hr %#x\n", hr);
+    ok(hr == S_OK, "got hr %#lx\n", hr);
     ok(!error, "got error %s\n", wine_dbgstr_w(error));
 
     return 0xdeadbeef;
@@ -906,7 +906,7 @@ static HRESULT WINAPI HlinkBrowseContext_GetObject(IHlinkBrowseContext *iface,
 
     CreateBindCtx(0, &bctx);
     hr = IMoniker_GetDisplayName(pimk, bctx, NULL, &name);
-    ok(hr == S_OK, "Failed to get display name, hr %#x.\n", hr);
+    ok(hr == S_OK, "Failed to get display name, hr %#lx.\n", hr);
     ok(!lstrcmpW(winehq_urlW, name) || !lstrcmpW(winehq_404W, name), "got unexpected url\n");
     CoTaskMemFree(name);
     IBindCtx_Release(bctx);
@@ -1066,7 +1066,7 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface,
 {
     CHECK_EXPECT(HT_Navigate);
 
-    ok(grfHLNF == 0, "grfHLNF = %x\n", grfHLNF);
+    ok(grfHLNF == 0, "grfHLNF = %lx\n", grfHLNF);
     ok(pwzJumpLocation == NULL, "pwzJumpLocation = %s\n", wine_dbgstr_w(pwzJumpLocation));
     return S_OK;
 }
@@ -1168,10 +1168,10 @@ static HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoni
     if (async_bind)
     {
         hr = IBindCtx_GetObjectParam(pbc, bscb_holderW, &bind_callback_holder);
-        ok(hr == S_OK, "Failed to get IBindStatusCallback holder, hr %#x.\n", hr);
+        ok(hr == S_OK, "Failed to get IBindStatusCallback holder, hr %#lx.\n", hr);
         hr = IUnknown_QueryInterface(bind_callback_holder, &IID_IBindStatusCallback,
                 (void **)&async_bind_callback);
-        ok(hr == S_OK, "Failed to get IBindStatusCallback interface, hr %#x.\n", hr);
+        ok(hr == S_OK, "Failed to get IBindStatusCallback interface, hr %#lx.\n", hr);
         IUnknown_Release(bind_callback_holder);
         return MK_S_ASYNCHRONOUS;
     }
@@ -1197,7 +1197,7 @@ static HRESULT WINAPI Moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMon
     ok(*ppv == NULL, "*ppv=%p\n", *ppv);
 
     hres = IBindCtx_GetObjectParam(pbc, BSCBHolder, &unk);
-    ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres);
+    ok(hres == S_OK, "GetObjectParam failed: %08lx\n", hres);
     ok(unk != NULL, "unk == NULL\n");
 
     IUnknown_Release(unk);
@@ -1341,7 +1341,7 @@ static void test_HlinkResolveMonikerForData(void)
     SET_EXPECT(BindToStorage);
 
     hres = HlinkResolveMonikerForData(&Moniker, 0, bctx, 0, NULL, &BindStatusCallback, NULL);
-    ok(hres == S_OK, "HlinkResolveMonikerForData failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkResolveMonikerForData failed: %08lx\n", hres);
 
     CHECK_CALLED(IsSystemMoniker);
     CHECK_CALLED(GetDisplayName);
@@ -1363,18 +1363,18 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* create two dummy monikers to use as targets */
     hres = CreateItemMoniker(one, one, &dummy);
-    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08lx\n", hres);
 
     hres = CreateItemMoniker(two, two, &dummy2);
-    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08lx\n", hres);
 
     /* create a new hlink: target => dummy, location => one */
     hres = HlinkCreateFromMoniker(dummy, one, name, NULL, 0, NULL, &IID_IHlink, (void**)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08lx\n", hres);
 
     /* validate the target and location */
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
     ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1382,10 +1382,10 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* set location => two */
     hres = IHlink_SetMonikerReference(hlink, HLINKSETF_LOCATION, dummy2, two);
-    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
     ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1393,10 +1393,10 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* set target => dummy2 */
     hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET, dummy2, one);
-    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt);
     ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1404,10 +1404,10 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* set target => dummy, location => one */
     hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, dummy, one);
-    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
     ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1415,10 +1415,10 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* no HLINKSETF flags */
     hres = IHlink_SetMonikerReference(hlink, 0, dummy2, two);
-    ok(hres == E_INVALIDARG, "IHlink_SetMonikerReference should've failed with E_INVALIDARG (0x%08x), failed with 0x%08x\n", E_INVALIDARG, hres);
+    ok(hres == E_INVALIDARG, "IHlink_SetMonikerReference should've failed with E_INVALIDARG (0x%08lx), failed with 0x%08lx\n", E_INVALIDARG, hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
     ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1430,7 +1430,7 @@ static void test_HlinkGetSetMonikerReference(void)
         IHlink_SetMonikerReference(hlink, 12, dummy2, two);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
     ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1438,10 +1438,10 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* valid & invalid HLINKSETF flags */
     hres = IHlink_SetMonikerReference(hlink, 12 | HLINKSETF_TARGET, dummy2, two);
-    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt);
     ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
     IMoniker_Release(found_trgt);
@@ -1449,10 +1449,10 @@ static void test_HlinkGetSetMonikerReference(void)
 
     /* NULL args */
     hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, NULL, NULL);
-    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
-    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
     ok(found_trgt == NULL, "Found target should've been %p, was: %p\n", NULL, found_trgt);
     ok(found_loc == NULL, "Found location should've been %s, was: %s\n", wine_dbgstr_w(NULL), wine_dbgstr_w(found_loc));
     if(found_trgt)
@@ -1468,11 +1468,11 @@ static void test_HlinkGetSetMonikerReference(void)
     SET_EXPECT(GetDisplayName);
     hres = HlinkCreateFromMoniker(&Moniker, NULL, NULL, NULL, 0, NULL,
             &IID_IHlink, (void **)&hlink);
-    ok(hres == S_OK, "CreateFromMoniker failed: %08x\n", hres);
+    ok(hres == S_OK, "CreateFromMoniker failed: %08lx\n", hres);
 
     hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_ABSOLUTE,
             &found_trgt, &found_loc);
-    ok(hres == S_OK, "CreateFromMoniker failed: %08x\n", hres);
+    ok(hres == S_OK, "CreateFromMoniker failed: %08lx\n", hres);
     ok(found_trgt == &Moniker, "Got unexpected moniker: %p\n", found_trgt);
     ok(found_loc == NULL, "Got unexpected location: %p\n", found_loc);
     todo_wine CHECK_CALLED(Reduce);
@@ -1495,31 +1495,31 @@ static void test_HlinkGetSetStringReference(void)
 
     /* create a new hlink: target => NULL, location => one */
     hres = HlinkCreateFromMoniker(NULL, one, empty, NULL, 0, NULL, &IID_IHlink, (void**)&link);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08lx\n", hres);
 
     /* test setting/getting location */
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
     CoTaskMemFree(fnd_loc);
 
     hres = IHlink_SetStringReference(link, HLINKSETF_LOCATION, one, two);
-    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
     CoTaskMemFree(fnd_loc);
 
     hres = IHlink_SetStringReference(link, -HLINKSETF_LOCATION, two, one);
-    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
@@ -1527,20 +1527,20 @@ static void test_HlinkGetSetStringReference(void)
 
     /* test setting/getting target */
     hres = IHlink_SetStringReference(link, HLINKSETF_TARGET, two, three);
-    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(!lstrcmpW(fnd_tgt, two), "Found target should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
     CoTaskMemFree(fnd_loc);
 
     hres = IHlink_SetStringReference(link, -HLINKSETF_TARGET, three, two);
-    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(!lstrcmpW(fnd_tgt, three), "Found target should have been %s, was: %s\n", wine_dbgstr_w(three), wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
@@ -1548,20 +1548,20 @@ static void test_HlinkGetSetStringReference(void)
 
     /* test setting/getting both */
     hres = IHlink_SetStringReference(link, HLINKSETF_TARGET | HLINKSETF_LOCATION, one, two);
-    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(!lstrcmpW(fnd_tgt, one), "Found target should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
     CoTaskMemFree(fnd_loc);
 
     hres = IHlink_SetStringReference(link, -(HLINKSETF_TARGET | HLINKSETF_LOCATION), three, one);
-    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
     ok(!lstrcmpW(fnd_tgt, three), "Found target should have been %s, was: %s\n", wine_dbgstr_w(three), wine_dbgstr_w(fnd_tgt));
     ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
@@ -1570,7 +1570,7 @@ static void test_HlinkGetSetStringReference(void)
     /* test invalid flags/params */
     hres = IHlink_GetStringReference(link, 4, &fnd_tgt, &fnd_loc);
     ok(hres == E_INVALIDARG, "IHlink_GetStringReference should have failed "
-           "with E_INVALIDARG (0x%08x), instead: 0x%08x\n", E_INVALIDARG, hres);
+           "with E_INVALIDARG (0x%08lx), instead: 0x%08lx\n", E_INVALIDARG, hres);
     ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt));
     ok(fnd_loc == NULL, "Found location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc));
     CoTaskMemFree(fnd_tgt);
@@ -1578,25 +1578,25 @@ static void test_HlinkGetSetStringReference(void)
 
     hres = IHlink_GetStringReference(link, -1, &fnd_tgt, NULL);
     todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed "
-           "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres);
+           "with E_FAIL (0x%08lx), instead: 0x%08lx\n", E_FAIL, hres);
     CoTaskMemFree(fnd_tgt);
 
     hres = IHlink_GetStringReference(link, -1, NULL, NULL);
-    ok(hres == S_OK, "failed, hres=%08x\n", hres);
+    ok(hres == S_OK, "failed, hres=%08lx\n", hres);
 
     hres = IHlink_GetStringReference(link, -1, NULL, &fnd_loc);
-    ok(hres == S_OK, "failed, hres=%08x\n", hres);
+    ok(hres == S_OK, "failed, hres=%08lx\n", hres);
     CoTaskMemFree(fnd_loc);
 
     hres = IHlink_GetStringReference(link, -1, &fnd_tgt, &fnd_loc);
     todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed "
-           "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres);
+           "with E_FAIL (0x%08lx), instead: 0x%08lx\n", E_FAIL, hres);
     CoTaskMemFree(fnd_tgt);
     CoTaskMemFree(fnd_loc);
 
     hres = IHlink_GetStringReference(link, -2, &fnd_tgt, &fnd_loc);
     ok(hres == E_INVALIDARG, "IHlink_GetStringReference should have failed "
-           "with E_INVALIDARG (0x%08x), instead: 0x%08x\n", E_INVALIDARG, hres);
+           "with E_INVALIDARG (0x%08lx), instead: 0x%08lx\n", E_INVALIDARG, hres);
     CoTaskMemFree(fnd_tgt);
     CoTaskMemFree(fnd_loc);
 
@@ -1615,7 +1615,7 @@ static void r_setStringRef(unsigned line, IHlink *hlink, DWORD flags, const WCHA
 {
     HRESULT hres;
     hres = IHlink_SetStringReference(hlink, flags, tgt, loc);
-    ok_(__FILE__,line) (hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres);
+    ok_(__FILE__,line) (hres == S_OK, "IHlink_SetStringReference failed: 0x%08lx\n", hres);
 }
 
 #define getStringRef(h,t,l) r_getStringRef(__LINE__,h,t,l)
@@ -1625,7 +1625,7 @@ static void r_getStringRef(unsigned line, IHlink *hlink, const WCHAR *exp_tgt, c
     WCHAR *fnd_tgt, *fnd_loc;
 
     hres = IHlink_GetStringReference(hlink, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc);
-    ok_(__FILE__,line) (hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres);
+    ok_(__FILE__,line) (hres == S_OK, "IHlink_GetStringReference failed: 0x%08lx\n", hres);
 
     if(exp_tgt)
         ok_(__FILE__,line) (!lstrcmpW(fnd_tgt, exp_tgt), "Found string target should have been %s, was: %s\n", wine_dbgstr_w(exp_tgt), wine_dbgstr_w(fnd_tgt));
@@ -1646,7 +1646,7 @@ static void r_setMonikerRef(unsigned line, IHlink *hlink, DWORD flags, IMoniker
 {
     HRESULT hres;
     hres = IHlink_SetMonikerReference(hlink, flags, tgt, loc);
-    ok_(__FILE__,line) (hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
+    ok_(__FILE__,line) (hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08lx\n", hres);
 }
 
 /* passing 0xFFFFFFFF as exp_tgt will return the retrieved target & not test it */
@@ -1658,7 +1658,7 @@ static IMoniker *r_getMonikerRef(unsigned line, IHlink *hlink, IMoniker *exp_tgt
     WCHAR *fnd_loc;
 
     hres = IHlink_GetMonikerReference(hlink, ref, &fnd_tgt, &fnd_loc);
-    ok_(__FILE__,line) (hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
+    ok_(__FILE__,line) (hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08lx\n", hres);
 
     if(exp_loc)
         ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc));
@@ -1689,7 +1689,7 @@ static void test_HlinkMoniker(void)
     HRESULT hres;
 
     hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08lx\n", hres);
     getStringRef(hlink, NULL, NULL);
     getMonikerRef(hlink, NULL, NULL, HLINKGETREF_RELATIVE);
 
@@ -1710,7 +1710,7 @@ static void test_HlinkMoniker(void)
     /* setting a moniker target also sets the target string to that moniker's
      * display name */
     hres = CreateFileMoniker(bW, &file_mon);
-    ok(hres == S_OK, "CreateFileMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateFileMoniker failed: 0x%08lx\n", hres);
 
     setMonikerRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, file_mon, wordsW);
     getStringRef(hlink, bW, wordsW);
@@ -1736,7 +1736,7 @@ static void test_HashLink(void)
 
     /* simple single hash test */
     hres = HlinkCreateFromString(hash_targetW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08lx\n", hres);
     ok(hlink != NULL, "Didn't get an hlink\n");
 
     if(hlink){
@@ -1754,7 +1754,7 @@ static void test_HashLink(void)
 
     /* two hashes in the target */
     hres = HlinkCreateFromString(two_hash_targetW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08lx\n", hres);
     ok(hlink != NULL, "Didn't get an hlink\n");
 
     if(hlink){
@@ -1769,7 +1769,7 @@ static void test_HashLink(void)
 
     /* target with hash plus a location string */
     hres = HlinkCreateFromString(hash_targetW, test_locW, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08lx\n", hres);
     ok(hlink != NULL, "Didn't get an hlink\n");
 
     if(hlink){
@@ -1784,7 +1784,7 @@ static void test_HashLink(void)
 
     /* target with hash containing no "target part" */
     hres = HlinkCreateFromString(hash_no_tgtW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08lx\n", hres);
     ok(hlink != NULL, "Didn't get an hlink\n");
 
     if(hlink){
@@ -1819,7 +1819,7 @@ static HRESULT WINAPI hls_site_Moniker_ComposeWith(IMoniker *iface,
     CHECK_EXPECT(ComposeWith);
 
     hres = IMoniker_GetDisplayName(right, NULL, NULL, &rightName);
-    ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres);
     ok(!lstrcmpW(rightName, ref_monikerW),
             "Expected to get moniker set via SetMonikerReference, instead got: %s\n",
             wine_dbgstr_w(rightName));
@@ -1928,7 +1928,7 @@ static ULONG WINAPI hls_Release(IHlinkSite *iface)
 static HRESULT WINAPI hls_QueryService(IHlinkSite *iface, DWORD siteData,
         REFGUID service, REFIID riid, IUnknown **punk)
 {
-    ok(0, "QS: %p %x %s %s %p\n", iface, siteData, wine_dbgstr_guid(service),
+    ok(0, "QS: %p %lx %s %s %p\n", iface, siteData, wine_dbgstr_guid(service),
             wine_dbgstr_guid(riid), punk);
     return E_NOTIMPL;
 }
@@ -1940,7 +1940,7 @@ static HRESULT WINAPI hls_GetMoniker(IHlinkSite *iface, DWORD siteData,
         DWORD assign, DWORD which, IMoniker **pmk)
 {
     ok(siteData == SITEDATA_NOTIMPL ||
-            siteData == SITEDATA_SUCCESS, "Unexpected site data: %u\n", siteData);
+            siteData == SITEDATA_SUCCESS, "Unexpected site data: %lu\n", siteData);
 
     if(siteData == SITEDATA_SUCCESS){
         *pmk = &hls_site_Moniker;
@@ -1953,7 +1953,7 @@ static HRESULT WINAPI hls_GetMoniker(IHlinkSite *iface, DWORD siteData,
 static HRESULT WINAPI hls_ReadyToNavigate(IHlinkSite *iface, DWORD siteData,
         DWORD reserved)
 {
-    ok(0, "RTN: %p %x %x\n", iface, siteData, reserved);
+    ok(0, "RTN: %p %lx %lx\n", iface, siteData, reserved);
     return E_NOTIMPL;
 }
 
@@ -1961,8 +1961,8 @@ static HRESULT WINAPI hls_OnNavigationComplete(IHlinkSite *iface,
         DWORD siteData, DWORD reserved, HRESULT error, LPCWSTR errorStr)
 {
     CHECK_EXPECT(OnNavigationComplete);
-    ok(siteData == SITEDATA_SUCCESS, "Unexpected site data: %u\n", siteData);
-    ok(error == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08x\n", error);
+    ok(siteData == SITEDATA_SUCCESS, "Unexpected site data: %lu\n", siteData);
+    ok(error == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08lx\n", error);
     return E_NOTIMPL;
 }
 
@@ -1987,26 +1987,26 @@ static void test_HlinkSite(void)
 
     hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL,
             &IID_IHlink, (LPVOID*)&hl);
-    ok(hres == S_OK, "HlinkCreateFromString failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: %08lx\n", hres);
     getMonikerRef(hl, NULL, NULL, HLINKGETREF_RELATIVE);
 
     hres = IHlink_SetHlinkSite(hl, &HlinkSite, SITEDATA_SUCCESS);
-    ok(hres == S_OK, "SetHlinkSite failed: %08x\n", hres);
+    ok(hres == S_OK, "SetHlinkSite failed: %08lx\n", hres);
     getMonikerRef(hl, NULL, NULL, HLINKGETREF_RELATIVE);
     getStringRef(hl, NULL, NULL);
 
     hres = IHlink_GetMonikerReference(hl, HLINKGETREF_RELATIVE, &mon_ref, NULL);
-    ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres);
+    ok(hres == S_OK, "GetMonikerReference failed: %08lx\n", hres);
     ok(mon_ref == NULL, "Didn't get expected moniker, instead: %p\n", mon_ref);
 
     hres = IHlink_GetMonikerReference(hl, HLINKGETREF_ABSOLUTE, &mon_ref, NULL);
-    ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres);
+    ok(hres == S_OK, "GetMonikerReference failed: %08lx\n", hres);
     ok(mon_ref == &hls_site_Moniker, "Didn't get expected moniker, instead: %p\n", mon_ref);
 
     SET_EXPECT(Reduce);
     SET_EXPECT(Enum);
     hres = IHlink_SetMonikerReference(hl, HLINKSETF_TARGET, &hls_ref_Moniker, NULL);
-    ok(hres == S_OK, "SetMonikerReference failed: %08x\n", hres);
+    ok(hres == S_OK, "SetMonikerReference failed: %08lx\n", hres);
     todo_wine CHECK_CALLED(Reduce);
     todo_wine CHECK_CALLED(Enum);
 
@@ -2017,23 +2017,23 @@ static void test_HlinkSite(void)
     todo_wine CHECK_CALLED(Enum);
 
     hres = IHlink_GetMonikerReference(hl, HLINKGETREF_RELATIVE, &mon_ref, NULL);
-    ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres);
+    ok(hres == S_OK, "GetMonikerReference failed: %08lx\n", hres);
     ok(mon_ref == &hls_ref_Moniker, "Didn't get expected moniker, instead: %p\n", mon_ref);
     IMoniker_Release(mon_ref);
 
     SET_EXPECT(ComposeWith);
     hres = IHlink_GetMonikerReference(hl, HLINKGETREF_ABSOLUTE, &mon_ref, NULL);
-    ok(hres == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08x\n", hres);
+    ok(hres == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08lx\n", hres);
     ok(mon_ref == NULL, "Shouldn't have got a Moniker, got: %p\n", mon_ref);
     CHECK_CALLED(ComposeWith);
 
     hres = CreateBindCtx(0, &pbc);
-    ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres);
+    ok(hres == S_OK, "CreateBindCtx failed: %08lx\n", hres);
 
     SET_EXPECT(ComposeWith);
     SET_EXPECT(OnNavigationComplete);
     hres = IHlink_Navigate(hl, 0, pbc, NULL, NULL);
-    ok(hres == E_OUTOFMEMORY, "Navigate should've failed: %08x\n", hres);
+    ok(hres == E_OUTOFMEMORY, "Navigate should've failed: %08lx\n", hres);
     CHECK_CALLED(ComposeWith);
     CHECK_CALLED(OnNavigationComplete);
 
@@ -2044,7 +2044,7 @@ static void test_HlinkSite(void)
     SET_EXPECT(Enum);
     hres = HlinkCreateFromMoniker(&hls_ref_Moniker, NULL, NULL, &HlinkSite, SITEDATA_SUCCESS,
             NULL, &IID_IHlink, (LPVOID*)&hl);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08lx\n", hres);
     todo_wine CHECK_CALLED(Reduce);
     todo_wine CHECK_CALLED(Enum);
     getMonikerRef(hl, &hls_ref_Moniker, NULL, HLINKGETREF_RELATIVE);
@@ -2052,7 +2052,7 @@ static void test_HlinkSite(void)
 
     hres = HlinkCreateFromMoniker(NULL, NULL, NULL, &HlinkSite, SITEDATA_SUCCESS,
             NULL, &IID_IHlink, (LPVOID*)&hl);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08lx\n", hres);
     getMonikerRef(hl, NULL, NULL, HLINKGETREF_RELATIVE);
     IHlink_Release(hl);
 
@@ -2062,7 +2062,7 @@ static void test_HlinkSite(void)
     SET_EXPECT(GetDisplayName);
     hres = HlinkCreateFromMoniker(&Moniker, NULL, NULL, &HlinkSite, SITEDATA_NOTIMPL,
             NULL, &IID_IHlink, (LPVOID*)&hl);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08lx\n", hres);
     getMonikerRef(hl, &Moniker, NULL, HLINKGETREF_ABSOLUTE);
     IHlink_Release(hl);
     todo_wine CHECK_CALLED(Reduce);
@@ -2084,14 +2084,14 @@ static void test_HlinkClone(void)
     const WCHAR name[] = {'a',0};
 
     hres = HlinkClone(NULL, NULL, NULL, 0, NULL);
-    ok(hres == E_INVALIDARG, "Got wrong failure code: %08x\n", hres);
+    ok(hres == E_INVALIDARG, "Got wrong failure code: %08lx\n", hres);
 
     hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL,
             &IID_IHlink, (void**)&hl);
-    ok(hres == S_OK, "HlinkCreateFromString failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromString failed: %08lx\n", hres);
 
     hres = HlinkClone(hl, &IID_IHlink, NULL, 0, NULL);
-    ok(hres == E_INVALIDARG, "Got wrong failure code: %08x\n", hres);
+    ok(hres == E_INVALIDARG, "Got wrong failure code: %08lx\n", hres);
 
     if (0)
     { 
@@ -2102,7 +2102,7 @@ static void test_HlinkClone(void)
     }
 
     hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned);
-    ok(hres == S_OK, "HlinkClone failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkClone failed: %08lx\n", hres);
     ok(cloned != NULL, "Didn't get a clone\n");
     getMonikerRef(cloned, NULL, NULL, HLINKGETREF_RELATIVE);
     IHlink_Release(cloned);
@@ -2114,7 +2114,7 @@ static void test_HlinkClone(void)
     hres = HlinkCreateFromMoniker(&hls_ref_Moniker, two, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hl);
     todo_wine CHECK_CALLED(Reduce);
     todo_wine CHECK_CALLED(Enum);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08lx\n", hres);
     getMonikerRef(hl, &hls_ref_Moniker, two, HLINKGETREF_RELATIVE);
 
     SET_EXPECT(Save);
@@ -2122,7 +2122,7 @@ static void test_HlinkClone(void)
     cloned = (IHlink*)0xdeadbeef;
     hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned);
     /* fails because of invalid CLSID given by Moniker_GetClassID */
-    ok(hres == REGDB_E_CLASSNOTREG, "Wrong error code: %08x\n", hres);
+    ok(hres == REGDB_E_CLASSNOTREG, "Wrong error code: %08lx\n", hres);
     ok(cloned == NULL, "Shouldn't have gotten a clone\n");
     CHECK_CALLED(Save);
     CHECK_CALLED(GetClassID);
@@ -2130,15 +2130,15 @@ static void test_HlinkClone(void)
     IHlink_Release(hl);
 
     hres = CreateItemMoniker(one, one, &dummy);
-    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "CreateItemMoniker failed: 0x%08lx\n", hres);
 
     hres = HlinkCreateFromMoniker(dummy, two, name, &HlinkSite, SITEDATA_SUCCESS, NULL, &IID_IHlink, (void**)&hl);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08lx\n", hres);
     getMonikerRef(hl, dummy, two, HLINKGETREF_RELATIVE);
 
     cloned = NULL;
     hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned);
-    ok(hres == S_OK, "HlinkClone failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkClone failed: %08lx\n", hres);
     ok(cloned != NULL, "Should have gotten a clone\n");
 
     fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, two, HLINKGETREF_RELATIVE);
@@ -2147,7 +2147,7 @@ static void test_HlinkClone(void)
 
     fnd_name = NULL;
     hres = IHlink_GetFriendlyName(cloned, HLFNAMEF_DEFAULT, &fnd_name);
-    ok(hres == S_OK, "GetFriendlyName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetFriendlyName failed: %08lx\n", hres);
     ok(fnd_name != NULL, "Expected friendly name to be non-NULL\n");
     ok(lstrcmpW(fnd_name, name) == 0, "Expected friendly name to be %s, was %s\n",
             wine_dbgstr_w(name), wine_dbgstr_w(fnd_name));
@@ -2156,20 +2156,20 @@ static void test_HlinkClone(void)
     fnd_site = (IHlinkSite*)0xdeadbeef;
     fnd_data = 4;
     hres = IHlink_GetHlinkSite(cloned, &fnd_site, &fnd_data);
-    ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres);
+    ok(hres == S_OK, "GetHlinkSite failed: %08lx\n", hres);
     ok(fnd_site == NULL, "Expected NULL site\n");
-    ok(fnd_data == 4, "Expected site data to be 4, was: %d\n", fnd_data);
+    ok(fnd_data == 4, "Expected site data to be 4, was: %ld\n", fnd_data);
 
     IHlink_Release(cloned);
     IHlink_Release(hl);
 
     hres = HlinkCreateFromMoniker(dummy, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hl);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08lx\n", hres);
     getMonikerRef(hl, dummy, NULL, HLINKGETREF_RELATIVE);
 
     cloned = NULL;
     hres = HlinkClone(hl, &IID_IHlink, &HlinkSite, SITEDATA_SUCCESS, (void**)&cloned);
-    ok(hres == S_OK, "HlinkClone failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkClone failed: %08lx\n", hres);
     ok(cloned != NULL, "Should have gotten a clone\n");
 
     fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, NULL, HLINKGETREF_RELATIVE);
@@ -2179,9 +2179,9 @@ static void test_HlinkClone(void)
     fnd_site = (IHlinkSite*)0xdeadbeef;
     fnd_data = 4;
     hres = IHlink_GetHlinkSite(cloned, &fnd_site, &fnd_data);
-    ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres);
+    ok(hres == S_OK, "GetHlinkSite failed: %08lx\n", hres);
     ok(fnd_site == &HlinkSite, "Expected found site to be HlinkSite, was: %p\n", fnd_site);
-    ok(fnd_data == SITEDATA_SUCCESS, "Unexpected site data: %u\n", fnd_data);
+    ok(fnd_data == SITEDATA_SUCCESS, "Unexpected site data: %lu\n", fnd_data);
 
     IHlink_Release(cloned);
     IHlink_Release(hl);
@@ -2199,28 +2199,28 @@ static void test_StdHlink(void)
 
     hres = CoCreateInstance(&CLSID_StdHlink, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
             &IID_IHlink, (void**)&hlink);
-    ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
+    ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
 
     str = (void*)0xdeadbeef;
     hres = IHlink_GetTargetFrameName(hlink, &str);
-    ok(hres == S_FALSE, "GetTargetFrameName failed: %08x\n", hres);
+    ok(hres == S_FALSE, "GetTargetFrameName failed: %08lx\n", hres);
     ok(!str, "str = %s\n", wine_dbgstr_w(str));
 
     hres = IHlink_SetTargetFrameName(hlink, testW);
-    ok(hres == S_OK, "SetTargetFrameName failed: %08x\n", hres);
+    ok(hres == S_OK, "SetTargetFrameName failed: %08lx\n", hres);
 
     str = (void*)0xdeadbeef;
     hres = IHlink_GetTargetFrameName(hlink, &str);
-    ok(hres == S_OK, "GetTargetFrameName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetTargetFrameName failed: %08lx\n", hres);
     ok(!lstrcmpW(str, testW), "str = %s\n", wine_dbgstr_w(str));
     CoTaskMemFree(str);
 
     hres = IHlink_SetTargetFrameName(hlink, NULL);
-    ok(hres == S_OK, "SetTargetFrameName failed: %08x\n", hres);
+    ok(hres == S_OK, "SetTargetFrameName failed: %08lx\n", hres);
 
     str = (void*)0xdeadbeef;
     hres = IHlink_GetTargetFrameName(hlink, &str);
-    ok(hres == S_FALSE, "GetTargetFrameName failed: %08x\n", hres);
+    ok(hres == S_FALSE, "GetTargetFrameName failed: %08lx\n", hres);
     ok(!str, "str = %s\n", wine_dbgstr_w(str));
 
     IHlink_Release(hlink);
@@ -2235,7 +2235,7 @@ static void test_Hlink_Navigate(void)
     HRESULT hres;
 
     hres = CreateBindCtx(0, &pbc);
-    ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres);
+    ok(hres == S_OK, "CreateBindCtx failed: %08lx\n", hres);
     _bctx = pbc;
 
     HBC_object = NULL;
@@ -2246,7 +2246,7 @@ static void test_Hlink_Navigate(void)
     SET_EXPECT(GetDisplayName);
     hres = HlinkCreateFromMoniker(&Moniker, NULL, NULL, NULL,
             0, NULL, &IID_IHlink, (void**)&hlink);
-    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres);
+    ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08lx\n", hres);
     todo_wine CHECK_CALLED(Reduce);
     todo_wine CHECK_CALLED(Enum);
     todo_wine CHECK_CALLED(IsSystemMoniker);
@@ -2264,7 +2264,7 @@ static void test_Hlink_Navigate(void)
     SET_EXPECT(HT_Navigate);
     SET_EXPECT(HT_GetFriendlyName);
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == S_OK, "Navigate failed: %08x\n", hres);
+    ok(hres == S_OK, "Navigate failed: %08lx\n", hres);
     CHECK_CALLED(IsSystemMoniker);
     CHECK_CALLED(GetDisplayName);
     CHECK_CALLED(HBC_GetObject);
@@ -2287,7 +2287,7 @@ static void test_Hlink_Navigate(void)
     SET_EXPECT(HT_Navigate);
     SET_EXPECT(HT_GetFriendlyName);
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == S_OK, "Navigate failed: %08x\n", hres);
+    ok(hres == S_OK, "Navigate failed: %08lx\n", hres);
     CHECK_CALLED(IsSystemMoniker);
     CHECK_CALLED(GetDisplayName);
     CHECK_CALLED(HBC_GetObject);
@@ -2301,13 +2301,13 @@ if (0) {    /* these currently open a browser window on wine */
     /* Test from string */
     SET_EXPECT(HBC_GetObject);
     hres = HlinkNavigateToStringReference(winehq_404W, NULL, NULL, 0, NULL, 0, pbc, NULL, &HlinkBrowseContext);
-    todo_wine ok(hres == INET_E_OBJECT_NOT_FOUND, "Expected INET_E_OBJECT_NOT_FOUND, got %08x\n", hres);
+    todo_wine ok(hres == INET_E_OBJECT_NOT_FOUND, "Expected INET_E_OBJECT_NOT_FOUND, got %08lx\n", hres);
     CHECK_CALLED(HBC_GetObject);
 
     /* MSDN claims browse context and bind context can't be null, but they can */
     SET_EXPECT(HBC_GetObject);
     hres = HlinkNavigateToStringReference(winehq_404W, NULL, NULL, 0, NULL, 0, NULL, NULL, &HlinkBrowseContext);
-    todo_wine ok(hres == INET_E_OBJECT_NOT_FOUND, "Expected INET_E_OBJECT_NOT_FOUND, got %08x\n", hres);
+    todo_wine ok(hres == INET_E_OBJECT_NOT_FOUND, "Expected INET_E_OBJECT_NOT_FOUND, got %08lx\n", hres);
     CHECK_CALLED(HBC_GetObject);
 }
 
@@ -2318,13 +2318,13 @@ if (0) {    /* these currently open a browser window on wine */
         SET_EXPECT(IsSystemMoniker);
         SET_EXPECT(GetDisplayName);
         hres = IHlink_Navigate(hlink, 0, NULL, NULL, NULL);
-        ok(hres == DRAGDROP_S_DROP, "Expected DRAGDROP_S_DROP, got %08x\n", hres);
+        ok(hres == DRAGDROP_S_DROP, "Expected DRAGDROP_S_DROP, got %08lx\n", hres);
         CHECK_CALLED(IsSystemMoniker);
         CHECK_CALLED(GetDisplayName);
 
         /* same, from string */
         hres = HlinkNavigateToStringReference(winehq_404W, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);
-        ok(hres == DRAGDROP_S_DROP, "Expected DRAGDROP_S_DROP, got %08x\n", hres);
+        ok(hres == DRAGDROP_S_DROP, "Expected DRAGDROP_S_DROP, got %08lx\n", hres);
 
         /* try basic test with valid URL */
         SET_EXPECT(HBC_GetObject);
@@ -2333,7 +2333,7 @@ if (0) {    /* these currently open a browser window on wine */
         SET_EXPECT(HBC_QueryInterface_IdentityUnmarshal);
         SET_EXPECT(HBC_QueryInterface_IUnknown);
         hres = HlinkNavigateToStringReference(winehq_urlW, NULL, NULL, 0, NULL, 0, pbc, NULL, &HlinkBrowseContext);
-        ok(hres == S_OK, "Expected S_OK, got %08x\n", hres);
+        ok(hres == S_OK, "Expected S_OK, got %08lx\n", hres);
         CHECK_CALLED(HBC_GetObject);
         todo_wine CHECK_CALLED(HBC_QueryInterface_IHlinkHistory);
         todo_wine CHECK_CALLED(HBC_QueryInterface_IMarshal);
@@ -2360,7 +2360,7 @@ if (0) {    /* these currently open a browser window on wine */
     SET_EXPECT(HT_GetFriendlyName);
     SET_EXPECT(BindStatusCallback_OnStopBinding);
     hres = IHlink_Navigate(hlink, 0, pbc, &BindStatusCallback, &HlinkBrowseContext);
-    ok(hres == S_OK, "Navigate failed: %#x\n", hres);
+    ok(hres == S_OK, "Navigate failed: %#lx\n", hres);
     CHECK_CALLED(IsSystemMoniker);
     CHECK_CALLED(GetDisplayName);
     CHECK_CALLED(HBC_GetObject);
@@ -2385,8 +2385,8 @@ todo_wine {
     todo_wine
     CHECK_CALLED(BindStatusCallback_OnStopBinding);
 
-    ok(bind_callback_refs == 1, "Got unexpected refcount %d.\n", bind_callback_refs);
-    ok(browse_ctx_refs == 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(bind_callback_refs == 1, "Got unexpected refcount %ld.\n", bind_callback_refs);
+    ok(browse_ctx_refs == 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     /* test asynchronous binding */
     async_bind = TRUE;
@@ -2396,7 +2396,7 @@ todo_wine {
     SET_EXPECT(Reduce);
     SET_EXPECT(BindToObject);
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == MK_S_ASYNCHRONOUS, "Navigate failed: %#x\n", hres);
+    ok(hres == MK_S_ASYNCHRONOUS, "Navigate failed: %#lx\n", hres);
     CHECK_CALLED(IsSystemMoniker);
     CHECK_CALLED(GetDisplayName);
     CHECK_CALLED(HBC_GetObject);
@@ -2404,16 +2404,16 @@ todo_wine {
     CHECK_CALLED(Reduce);
     CHECK_CALLED(BindToObject);
 
-    ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(browse_ctx_refs > 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres);
+    ok(hres == E_UNEXPECTED, "Got hr %#lx.\n", hres);
 
     hres = IBindStatusCallback_GetBindInfo(async_bind_callback, &bind_flags, &bind_info);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
 
     hres = IBindStatusCallback_OnStartBinding(async_bind_callback, 0, NULL);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
 
     SET_EXPECT(HT_QueryInterface_IHlinkTarget);
     SET_EXPECT(HT_GetBrowseContext);
@@ -2423,7 +2423,7 @@ todo_wine {
     SET_EXPECT(HT_GetFriendlyName);
     hres = IBindStatusCallback_OnObjectAvailable(async_bind_callback, &IID_IUnknown,
             (IUnknown *)&HlinkTarget);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
     CHECK_CALLED(HT_QueryInterface_IHlinkTarget);
     todo_wine
     CHECK_CALLED(HT_GetBrowseContext);
@@ -2435,14 +2435,14 @@ todo_wine {
     CHECK_CALLED(HT_GetFriendlyName);
 
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres);
+    ok(hres == E_UNEXPECTED, "Got hr %#lx.\n", hres);
 
-    ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(browse_ctx_refs > 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     hres = IBindStatusCallback_OnStopBinding(async_bind_callback, S_OK, NULL);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
 
-    ok(browse_ctx_refs == 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(browse_ctx_refs == 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     IBindStatusCallback_Release(async_bind_callback);
 
@@ -2453,7 +2453,7 @@ todo_wine {
     SET_EXPECT(Reduce);
     SET_EXPECT(BindToObject);
     hres = IHlink_Navigate(hlink, 0, pbc, &BindStatusCallback, &HlinkBrowseContext);
-    ok(hres == MK_S_ASYNCHRONOUS, "Navigate failed: %#x\n", hres);
+    ok(hres == MK_S_ASYNCHRONOUS, "Navigate failed: %#lx\n", hres);
     CHECK_CALLED(IsSystemMoniker);
     CHECK_CALLED(GetDisplayName);
     todo_wine
@@ -2463,20 +2463,20 @@ todo_wine {
     CHECK_CALLED(Reduce);
     CHECK_CALLED(BindToObject);
 
-    ok(bind_callback_refs > 1, "Got unexpected refcount %d.\n", bind_callback_refs);
-    ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(bind_callback_refs > 1, "Got unexpected refcount %ld.\n", bind_callback_refs);
+    ok(browse_ctx_refs > 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres);
+    ok(hres == E_UNEXPECTED, "Got hr %#lx.\n", hres);
 
     SET_EXPECT(BindStatusCallback_GetBindInfo);
     hres = IBindStatusCallback_GetBindInfo(async_bind_callback, &bind_flags, &bind_info);
-    ok(hres == E_NOTIMPL, "Got hr %#x.\n", hres);
+    ok(hres == E_NOTIMPL, "Got hr %#lx.\n", hres);
     CHECK_CALLED(BindStatusCallback_GetBindInfo);
 
     SET_EXPECT(BindStatusCallback_OnStartBinding);
     hres = IBindStatusCallback_OnStartBinding(async_bind_callback, 0, NULL);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
     CHECK_CALLED(BindStatusCallback_OnStartBinding);
 
     SET_EXPECT(BindStatusCallback_OnObjectAvailable);
@@ -2488,7 +2488,7 @@ todo_wine {
     SET_EXPECT(HT_GetFriendlyName);
     hres = IBindStatusCallback_OnObjectAvailable(async_bind_callback, &IID_IUnknown,
             (IUnknown *)&HlinkTarget);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
     CHECK_CALLED(BindStatusCallback_OnObjectAvailable);
     CHECK_CALLED(HT_QueryInterface_IHlinkTarget);
     todo_wine
@@ -2501,18 +2501,18 @@ todo_wine {
     CHECK_CALLED(HT_GetFriendlyName);
 
     hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext);
-    ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres);
+    ok(hres == E_UNEXPECTED, "Got hr %#lx.\n", hres);
 
-    ok(bind_callback_refs > 1, "Got unexpected refcount %d.\n", bind_callback_refs);
-    ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(bind_callback_refs > 1, "Got unexpected refcount %ld.\n", bind_callback_refs);
+    ok(browse_ctx_refs > 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     SET_EXPECT(BindStatusCallback_OnStopBinding);
     hres = IBindStatusCallback_OnStopBinding(async_bind_callback, S_OK, NULL);
-    ok(hres == S_OK, "Got hr %#x.\n", hres);
+    ok(hres == S_OK, "Got hr %#lx.\n", hres);
     CHECK_CALLED(BindStatusCallback_OnStopBinding);
 
-    ok(bind_callback_refs == 1, "Got unexpected refcount %d.\n", bind_callback_refs);
-    ok(browse_ctx_refs == 1, "Got unexpected refcount %d.\n", browse_ctx_refs);
+    ok(bind_callback_refs == 1, "Got unexpected refcount %ld.\n", bind_callback_refs);
+    ok(browse_ctx_refs == 1, "Got unexpected refcount %ld.\n", browse_ctx_refs);
 
     IBindStatusCallback_Release(async_bind_callback);
 
@@ -2594,16 +2594,16 @@ static void test_HlinkUpdateStackItem(void)
     HRESULT hr;
 
     hr = HlinkUpdateStackItem(NULL, NULL, HLID_CURRENT, &Moniker, location, NULL);
-    ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
 
     SET_EXPECT(HBC_UpdateHlink);
     hr = HlinkUpdateStackItem(NULL, &HlinkBrowseContext, HLID_CURRENT, &Moniker, location, NULL);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
     CHECK_CALLED(HBC_UpdateHlink);
 
     SET_EXPECT(HLF_UpdateHlink);
     hr = HlinkUpdateStackItem(&testframe, &HlinkBrowseContext, HLID_CURRENT, &Moniker, location, NULL);
-    ok(hr == S_OK, "got 0x%08x\n", hr);
+    ok(hr == S_OK, "got 0x%08lx\n", hr);
     CHECK_CALLED(HLF_UpdateHlink);
 }
 




More information about the wine-devel mailing list