From 7f0c59f360eaba2ff4f343ac54884feb4e50a73a Mon Sep 17 00:00:00 2001
From: Eric Pouech <eric.pouech@gmail.com>
Date: Thu, 3 Mar 2022 11:40:55 -0600
Subject: [PATCH] devenum/tests: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 dlls/devenum/tests/Makefile.in |   1 -
 dlls/devenum/tests/devenum.c   | 266 ++++++++++++++++-----------------
 2 files changed, 133 insertions(+), 134 deletions(-)

diff --git a/dlls/devenum/tests/Makefile.in b/dlls/devenum/tests/Makefile.in
index 762c007deee..2d6ec2d87ea 100644
--- a/dlls/devenum/tests/Makefile.in
+++ b/dlls/devenum/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 TESTDLL   = devenum.dll
 IMPORTS   = advapi32 dsound msdmo msvfw32 oleaut32 ole32 winmm
 
diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c
index 1a1e48e1a4b..b3ef3da0356 100644
--- a/dlls/devenum/tests/devenum.c
+++ b/dlls/devenum/tests/devenum.c
@@ -48,26 +48,26 @@ static void test_devenum(void)
 
     hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
                            &IID_ICreateDevEnum, (LPVOID*)&create_devenum);
-    ok(hr == S_OK, "Failed to create devenum: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_ActiveMovieCategories, &enum_cat, 0);
-    ok(hr == S_OK, "Failed to enum categories: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     while (IEnumMoniker_Next(enum_cat, 1, &moniker, NULL) == S_OK)
     {
         hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "IMoniker_BindToStorage failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantInit(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == S_OK, "Failed to read CLSID: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         hr = CLSIDFromString(V_BSTR(&var), &cat_guid);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "Failed to read FriendlyName: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         if (winetest_debug > 1)
             trace("%s %s:\n", wine_dbgstr_guid(&cat_guid), wine_dbgstr_w(V_BSTR(&var)));
@@ -77,7 +77,7 @@ static void test_devenum(void)
         IMoniker_Release(moniker);
 
         hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &cat_guid, &enum_moniker, 0);
-        ok(SUCCEEDED(hr), "Failed to enum devices: %#x\n", hr);
+        ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
 
         if (hr == S_OK)
         {
@@ -86,29 +86,29 @@ static void test_devenum(void)
             while (IEnumMoniker_Next(enum_moniker, 1, &moniker, NULL) == S_OK)
             {
                 hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &displayname);
-                ok(hr == S_OK, "got %#x\n", hr);
+                ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
                 hr = IMoniker_GetClassID(moniker, NULL);
-                ok(hr == E_INVALIDARG, "IMoniker_GetClassID should failed %x\n", hr);
+                ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
                 hr = IMoniker_GetClassID(moniker, &clsid);
-                ok(hr == S_OK, "IMoniker_GetClassID failed with error %x\n", hr);
+                ok(hr == S_OK, "Got hr %#lx.\n", hr);
                 ok(IsEqualGUID(&clsid, &CLSID_CDeviceMoniker),
                    "Expected CLSID_CDeviceMoniker got %s\n", wine_dbgstr_guid(&clsid));
 
                 VariantInit(&var);
                 hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag);
-                ok(hr == S_OK, "IMoniker_BindToStorage failed with error %x\n", hr);
+                ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
                 hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
                 ok((hr == S_OK) | (hr == ERROR_KEY_DOES_NOT_EXIST),
-					"IPropertyBag_Read failed: %#x\n", hr);
+					"Got hr %#lx.\n", hr);
 
                 if (winetest_debug > 1)
                     trace("  %s %s\n", wine_dbgstr_w(displayname), wine_dbgstr_w(V_BSTR(&var)));
 
                 hr = IMoniker_BindToObject(moniker, NULL, NULL, &IID_IUnknown, NULL);
-                ok(hr == E_POINTER, "got %#x\n", hr);
+                ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
 
                 VariantClear(&var);
                 hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
@@ -122,13 +122,13 @@ static void test_devenum(void)
                             &IID_IUnknown, (void **)&unk);
                     if (hr2 == S_OK)
                         IUnknown_Release(unk);
-                    ok(hr2 == hr, "Expected hr %#x, got %#x.\n", hr, hr2);
+                    ok(hr2 == hr, "Expected hr %#lx, got %#lx.\n", hr, hr2);
                 }
 
                 hr = CreateBindCtx(0, &bindctx);
-                ok(hr == S_OK, "Got hr %#x.\n", hr);
+                ok(hr == S_OK, "Got hr %#lx.\n", hr);
                 hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag);
-                ok(hr == S_OK, "IMoniker_BindToStorage failed with error %x\n", hr);
+                ok(hr == S_OK, "Got hr %#lx.\n", hr);
                 IPropertyBag_Release(prop_bag);
                 IBindCtx_Release(bindctx);
 
@@ -157,19 +157,19 @@ static void test_moniker_isequal(void)
 
     hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
                            &IID_ICreateDevEnum, (LPVOID*)&create_devenum);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker0, 0);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK
             && IEnumMoniker_Next(enum_moniker0, 1, &moniker1, NULL) == S_OK)
     {
         hr = IMoniker_IsEqual(moniker0, moniker1);
-        ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+        ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
 
         hr = IMoniker_IsEqual(moniker1, moniker0);
-        ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+        ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
 
         IMoniker_Release(moniker0);
         IMoniker_Release(moniker1);
@@ -181,18 +181,18 @@ static void test_moniker_isequal(void)
     IEnumMoniker_Release(enum_moniker0);
 
     hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker0, 0);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_AudioRendererCategory, &enum_moniker1, 0);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK
             && IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK)
     {
         hr = IMoniker_IsEqual(moniker0, moniker1);
-        ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+        ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
 
         hr = IMoniker_IsEqual(moniker1, moniker0);
-        ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+        ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
 
         IMoniker_Release(moniker0);
         IMoniker_Release(moniker1);
@@ -205,18 +205,18 @@ static void test_moniker_isequal(void)
     IEnumMoniker_Release(enum_moniker1);
 
     hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker0, 0);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker1, 0);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK
             && IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK)
     {
         hr = IMoniker_IsEqual(moniker0, moniker1);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         hr = IMoniker_IsEqual(moniker1, moniker0);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         IMoniker_Release(moniker0);
         IMoniker_Release(moniker1);
@@ -265,7 +265,7 @@ static void test_register_filter(void)
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, &IID_IFilterMapper2, (void **)&mapper2);
-    ok(hr == S_OK, "Failed to create FilterMapper2: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     rgf2.dwVersion = 2;
     rgf2.dwMerit = MERIT_UNLIKELY;
@@ -279,24 +279,24 @@ static void test_register_filter(void)
         IFilterMapper2_Release(mapper2);
         return;
     }
-    ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     ok(find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should be registered\n");
 
     hr = IFilterMapper2_UnregisterFilter(mapper2, NULL, NULL, &CLSID_TestFilter);
-    ok(hr == S_OK, "UnregisterFilter failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     ok(!find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should not be registered\n");
     IMoniker_Release(mon);
 
     mon = NULL;
     hr = IFilterMapper2_RegisterFilter(mapper2, &CLSID_TestFilter, L"devenum test", &mon, &CLSID_AudioRendererCategory, NULL, &rgf2);
-    ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     ok(find_moniker(&CLSID_AudioRendererCategory, mon), "filter should be registered\n");
 
     hr = IFilterMapper2_UnregisterFilter(mapper2, &CLSID_AudioRendererCategory, NULL, &CLSID_TestFilter);
-    ok(hr == S_OK, "UnregisterFilter failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "filter should not be registered\n");
     IMoniker_Release(mon);
@@ -312,10 +312,10 @@ static IMoniker *check_display_name_(int line, IParseDisplayName *parser, WCHAR
     WCHAR *str;
 
     hr = IParseDisplayName_ParseDisplayName(parser, NULL, buffer, &eaten, &mon);
-    ok_(__FILE__, line)(hr == S_OK, "ParseDisplayName failed: %#x\n", hr);
+    ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
 
     hr = IMoniker_GetDisplayName(mon, NULL, NULL, &str);
-    ok_(__FILE__, line)(hr == S_OK, "GetDisplayName failed: %#x\n", hr);
+    ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
     ok_(__FILE__, line)(!wcscmp(str, buffer), "got %s\n", wine_dbgstr_w(str));
 
     CoTaskMemFree(str);
@@ -338,7 +338,7 @@ static void test_directshow_filter(void)
 
     /* Test ParseDisplayName and GetDisplayName */
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     wcscpy(buffer, L"@device:sw:");
     StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID);
@@ -349,11 +349,11 @@ static void test_directshow_filter(void)
     ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "filter should not be registered\n");
 
     hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-    ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     VariantInit(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr);
+    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got hr %#lx.\n", hr);
 
     /* writing causes the key to be created */
     V_VT(&var) = VT_BSTR;
@@ -361,60 +361,60 @@ static void test_directshow_filter(void)
     hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
     if (hr != E_ACCESSDENIED)
     {
-        ok(hr == S_OK, "Write failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         ok(find_moniker(&CLSID_AudioRendererCategory, mon), "filter should be registered\n");
 
         VariantClear(&var);
         V_VT(&var) = VT_EMPTY;
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var));
         ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         V_VT(&var) = VT_LPWSTR;
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+        ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
         V_VT(&var) = VT_BSTR;
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var));
         ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
 
         V_VT(&var) = VT_LPWSTR;
         hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
-        ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+        ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
         VariantClear(&var);
 
         V_VT(&var) = VT_I4;
         V_I4(&var) = 0xdeadbeef;
         hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         V_VT(&var) = VT_EMPTY;
         hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var));
-        ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var));
+        ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
 
         V_VT(&var) = VT_UI4;
         hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-        ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+        ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
         V_VT(&var) = VT_BSTR;
         hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-        ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+        ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
         V_VT(&var) = VT_I4;
         hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var));
-        ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var));
+        ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
 
         V_VT(&var) = VT_UI4;
         hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
-        ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+        ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
         V_VT(&var) = VT_ARRAY | VT_UI1;
         V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
@@ -422,12 +422,12 @@ static void test_directshow_filter(void)
         memcpy(array_data, "test data", 10);
         SafeArrayUnaccessData(V_ARRAY(&var));
         hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantClear(&var);
         V_VT(&var) = VT_EMPTY;
         hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(V_VT(&var) == (VT_ARRAY | VT_UI1), "Got type %#x.\n", V_VT(&var));
         SafeArrayAccessData(V_ARRAY(&var), &array_data);
         ok(!memcmp(array_data, "test data", 10), "Got wrong data.\n");
@@ -440,7 +440,7 @@ static void test_directshow_filter(void)
         StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID);
         wcscat(buffer, L"\\Instance\\test");
         res = RegDeleteKeyW(HKEY_CLASSES_ROOT, buffer);
-        ok(!res, "RegDeleteKey failed: %lu\n", res);
+        ok(!res, "Failed to delete key, error %Iu.\n", res);
     }
 
     VariantClear(&var);
@@ -452,22 +452,22 @@ static void test_directshow_filter(void)
     mon = check_display_name(parser, buffer);
 
     hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-    ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     VariantClear(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr);
+    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_BSTR;
     V_BSTR(&var) = SysAllocString(L"test");
     hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
     if (hr != E_ACCESSDENIED)
     {
-        ok(hr == S_OK, "Write failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(!wcscmp(V_BSTR(&var), L"test"), "got %s\n", wine_dbgstr_w(V_BSTR(&var)));
 
         IMoniker_Release(mon);
@@ -476,7 +476,7 @@ static void test_directshow_filter(void)
         RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\\test\\Instance");
 
         res = RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\\test");
-        ok(!res, "RegDeleteKey failed: %lu\n", res);
+        ok(!res, "Failed to delete key, error %Iu.\n", res);
     }
 
     VariantClear(&var);
@@ -497,7 +497,7 @@ static void test_codec(void)
 
     /* Test ParseDisplayName and GetDisplayName */
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     wcscpy(buffer, L"@device:cm:");
     StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID);
@@ -508,66 +508,66 @@ static void test_codec(void)
     ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "codec should not be registered\n");
 
     hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-    ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     VariantInit(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr);
+    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_BSTR;
     V_BSTR(&var) = SysAllocString(L"test");
     hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
-    ok(hr == S_OK, "Write failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_LPWSTR;
     hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
-    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+    ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
     VariantClear(&var);
     V_VT(&var) = VT_EMPTY;
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var));
     ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
 
     VariantClear(&var);
     V_VT(&var) = VT_LPWSTR;
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+    ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_BSTR;
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var));
     ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
 
     V_VT(&var) = VT_I4;
     V_I4(&var) = 0xdeadbeef;
     hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_EMPTY;
     hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var));
-    ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var));
+    ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
 
     V_VT(&var) = VT_UI4;
     hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+    ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
     V_VT(&var) = VT_BSTR;
     hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+    ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_I4;
     hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var));
-    ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var));
+    ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
 
     V_VT(&var) = VT_UI4;
     hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
-    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+    ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_ARRAY | VT_UI1;
     V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
@@ -575,7 +575,7 @@ static void test_codec(void)
     memcpy(array_data, "test data", 10);
     SafeArrayUnaccessData(V_ARRAY(&var));
     hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     /* unlike DirectShow filters, these are automatically generated, so
      * enumerating them will destroy the key */
@@ -583,7 +583,7 @@ static void test_codec(void)
 
     VariantClear(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr);
+    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got hr %#lx.\n", hr);
 
     IPropertyBag_Release(prop_bag);
     IMoniker_Release(mon);
@@ -606,7 +606,7 @@ static void test_dmo(const GUID *dmo_category, const GUID *enum_category)
     GUID clsid;
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     wcscpy(buffer, L"@device:dmo:");
     StringFromGUID2(&CLSID_TestFilter, buffer + wcslen(buffer), CHARS_IN_GUID);
@@ -616,47 +616,47 @@ static void test_dmo(const GUID *dmo_category, const GUID *enum_category)
     ok(!find_moniker(enum_category, mon), "DMO should not be registered\n");
 
     hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-    ok(hr == S_OK, "got %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     VariantInit(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == E_FAIL, "got %#x\n", hr);
+    ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
 
     V_VT(&var) = VT_BSTR;
     V_BSTR(&var) = SysAllocString(L"devenum test");
     hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
-    ok(hr == E_ACCESSDENIED, "Write failed: %#x\n", hr);
+    ok(hr == E_ACCESSDENIED, "Got hr %#lx.\n", hr);
 
     hr = DMORegister(L"devenum test", &CLSID_TestFilter, dmo_category, 0, 0, NULL, 0, NULL);
     if (hr != E_FAIL)
     {
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         ok(find_moniker(enum_category, mon), "DMO should be registered\n");
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(!wcscmp(V_BSTR(&var), L"devenum test"), "got %s\n", wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         V_VT(&var) = VT_BSTR;
         V_BSTR(&var) = SysAllocString(L"devenum test");
         hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
-        ok(hr == E_ACCESSDENIED, "Write failed: %#x\n", hr);
+        ok(hr == E_ACCESSDENIED, "Got hr %#lx.\n", hr);
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "got %#x\n", hr);
+        ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Got hr %#lx.\n", hr);
 
         hr = DMOUnregister(&CLSID_TestFilter, dmo_category);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
     }
     IPropertyBag_Release(prop_bag);
     IMoniker_Release(mon);
 
     hr = DMOEnum(&DMOCATEGORY_AUDIO_DECODER, 0, 0, NULL, 0, NULL, &enumdmo);
-    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     while (IEnumDMO_Next(enumdmo, 1, &clsid, &name, NULL) == S_OK)
     {
@@ -667,35 +667,35 @@ static void test_dmo(const GUID *dmo_category, const GUID *enum_category)
         ok(find_moniker(&DMOCATEGORY_AUDIO_DECODER, mon), "DMO was not found.\n");
 
         hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(!wcscmp(V_BSTR(&var), name), "got %s\n", wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         V_VT(&var) = VT_BSTR;
         V_BSTR(&var) = SysAllocString(L"devenum test");
         hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
-        ok(hr == E_ACCESSDENIED, "Write failed: %#x\n", hr);
+        ok(hr == E_ACCESSDENIED, "Got hr %#lx.\n", hr);
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "got %#x\n", hr);
+        ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Got hr %#lx.\n", hr);
 
         IPropertyBag_Release(prop_bag);
         CoTaskMemFree(name);
 
         hr = IMoniker_BindToObject(mon, NULL, NULL, &IID_IBaseFilter, (void **)&filter);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         hr = IBaseFilter_GetClassID(filter, &clsid);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(IsEqualGUID(&clsid, &CLSID_DMOWrapperFilter), "Got CLSID %s.\n", debugstr_guid(&clsid));
 
         hr = IBaseFilter_QueryInterface(filter, &IID_IMediaObject, (void **)&dmo);
-        ok(hr == S_OK, "got %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         IMediaObject_Release(dmo);
 
         IBaseFilter_Release(filter);
@@ -716,10 +716,10 @@ static void test_legacy_filter(void)
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, &IID_IFilterMapper, (void **)&mapper);
-    ok(hr == S_OK, "Failed to create FilterMapper: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     hr = IFilterMapper_RegisterFilter(mapper, CLSID_TestFilter, L"test", 0xdeadbeef);
     if (hr == VFW_E_BAD_KEY)
@@ -727,7 +727,7 @@ static void test_legacy_filter(void)
         win_skip("not enough permissions to register filters\n");
         goto end;
     }
-    ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     wcscpy(buffer, L"@device:cm:");
     StringFromGUID2(&CLSID_LegacyAmFilterCategory, buffer + wcslen(buffer), CHARS_IN_GUID);
@@ -738,11 +738,11 @@ static void test_legacy_filter(void)
     ok(find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should be registered\n");
 
     hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-    ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     VariantInit(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-    ok(hr == S_OK, "Read failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     StringFromGUID2(&CLSID_TestFilter, buffer, CHARS_IN_GUID);
     ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -750,7 +750,7 @@ static void test_legacy_filter(void)
 
     VariantClear(&var);
     hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-    ok(hr == S_OK, "Read failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
         wine_dbgstr_w(buffer), wine_dbgstr_w(V_BSTR(&var)));
 
@@ -758,7 +758,7 @@ static void test_legacy_filter(void)
     IPropertyBag_Release(prop_bag);
 
     hr = IFilterMapper_UnregisterFilter(mapper, CLSID_TestFilter);
-    ok(hr == S_OK, "UnregisterFilter failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     ok(!find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should not be registered\n");
     IMoniker_Release(mon);
@@ -790,7 +790,7 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod
     }
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     wcscpy(buffer, L"@device:cm:");
     StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID);
@@ -800,7 +800,7 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod
     mon = check_display_name(parser, buffer);
 
     hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-    ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     VariantInit(&var);
     hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
@@ -818,19 +818,19 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod
         mon = check_display_name(parser, buffer);
 
         hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantInit(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
     }
-    ok(hr == S_OK, "Read failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     ok(!wcscmp(name, V_BSTR(&var)), "expected %s, got %s\n",
         wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
 
     VariantClear(&var);
     hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-    ok(hr == S_OK, "Read failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     StringFromGUID2(&CLSID_DSoundRender, buffer, CHARS_IN_GUID);
     ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -838,7 +838,7 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod
 
     VariantClear(&var);
     hr = IPropertyBag_Read(prop_bag, L"DSGuid", &var, NULL);
-    ok(hr == S_OK, "Read failed: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     StringFromGUID2(guid, buffer, CHARS_IN_GUID);
     ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -866,7 +866,7 @@ static void test_waveout(void)
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     count = waveOutGetNumDevs();
 
@@ -887,7 +887,7 @@ static void test_waveout(void)
         mon = check_display_name(parser, buffer);
 
         hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantInit(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
@@ -909,18 +909,18 @@ static void test_waveout(void)
             mon = check_display_name(parser, buffer);
 
             hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-            ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+            ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
             hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
         }
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         ok(!wcsncmp(name, V_BSTR(&var), wcslen(name)), "expected %s, got %s\n",
             wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         StringFromGUID2(&CLSID_AudioRender, buffer, CHARS_IN_GUID);
         ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -928,9 +928,9 @@ static void test_waveout(void)
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"WaveOutId", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
-        ok(V_I4(&var) == i, "expected %d, got %d\n", i, V_I4(&var));
+        ok(V_I4(&var) == i, "Expected id %d, got %ld.\n", i, V_I4(&var));
 
         IPropertyBag_Release(prop_bag);
         IMoniker_Release(mon);
@@ -953,7 +953,7 @@ static void test_wavein(void)
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     count = waveInGetNumDevs();
 
@@ -969,7 +969,7 @@ static void test_wavein(void)
         mon = check_display_name(parser, buffer);
 
         hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantInit(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
@@ -991,18 +991,18 @@ static void test_wavein(void)
             mon = check_display_name(parser, buffer);
 
             hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-            ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+            ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
             hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
         }
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         ok(!wcsncmp(caps.szPname, V_BSTR(&var), wcslen(caps.szPname)), "expected %s, got %s\n",
             wine_dbgstr_w(caps.szPname), wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         StringFromGUID2(&CLSID_AudioRecord, buffer, CHARS_IN_GUID);
         ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -1010,9 +1010,9 @@ static void test_wavein(void)
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"WaveInId", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
-        ok(V_I4(&var) == i, "expected %d, got %d\n", i, V_I4(&var));
+        ok(V_I4(&var) == i, "Expected id %d, got %ld.\n", i, V_I4(&var));
 
         IPropertyBag_Release(prop_bag);
         IMoniker_Release(mon);
@@ -1034,7 +1034,7 @@ static void test_midiout(void)
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     count = midiOutGetNumDevs();
 
@@ -1055,18 +1055,18 @@ static void test_midiout(void)
         mon = check_display_name(parser, buffer);
 
         hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantInit(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         ok(!wcscmp(name, V_BSTR(&var)), "expected %s, got %s\n",
             wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         StringFromGUID2(&CLSID_AVIMIDIRender, buffer, CHARS_IN_GUID);
         ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -1074,9 +1074,9 @@ static void test_midiout(void)
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"MidiOutId", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
-        ok(V_I4(&var) == i, "expected %d, got %d\n", i, V_I4(&var));
+        ok(V_I4(&var) == i, "Expected id %d, got %ld.\n", i, V_I4(&var));
 
         IPropertyBag_Release(prop_bag);
         IMoniker_Release(mon);
@@ -1104,7 +1104,7 @@ static void test_vfw(void)
     }
 
     hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser);
-    ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
     while (ICInfo(ICTYPE_VIDEO, i++, &info))
     {
@@ -1123,18 +1123,18 @@ static void test_vfw(void)
         mon = check_display_name(parser, buffer);
 
         hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
-        ok(hr == S_OK, "BindToStorage failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         VariantInit(&var);
         hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         ok(!wcscmp(info.szDescription, V_BSTR(&var)), "expected %s, got %s\n",
             wine_dbgstr_w(info.szDescription), wine_dbgstr_w(V_BSTR(&var)));
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
 
         StringFromGUID2(&CLSID_AVICo, buffer, CHARS_IN_GUID);
         ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n",
@@ -1142,7 +1142,7 @@ static void test_vfw(void)
 
         VariantClear(&var);
         hr = IPropertyBag_Read(prop_bag, L"FccHandler", &var, NULL);
-        ok(hr == S_OK, "Read failed: %#x\n", hr);
+        ok(hr == S_OK, "Got hr %#lx.\n", hr);
         ok(!wcscmp(name, V_BSTR(&var)), "expected %s, got %s\n",
             wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
 
@@ -1171,7 +1171,7 @@ START_TEST(devenum)
 
     test_legacy_filter();
     hr = DirectSoundEnumerateW(test_dsound, NULL);
-    ok(hr == S_OK, "got %#x\n", hr);
+    ok(hr == S_OK, "Got hr %#lx.\n", hr);
     test_waveout();
     test_wavein();
     test_midiout();