[PATCH 26/31] dlls/dxdiagn/tests: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Thu Feb 24 04:29:15 CST 2022


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

---
 dlls/dxdiagn/tests/Makefile.in |    1 
 dlls/dxdiagn/tests/container.c |  174 ++++++++++++++++++++--------------------
 dlls/dxdiagn/tests/provider.c  |   30 +++----
 3 files changed, 102 insertions(+), 103 deletions(-)

diff --git a/dlls/dxdiagn/tests/Makefile.in b/dlls/dxdiagn/tests/Makefile.in
index 1deee3a846c..04437c5e7bd 100644
--- a/dlls/dxdiagn/tests/Makefile.in
+++ b/dlls/dxdiagn/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 TESTDLL   = dxdiagn.dll
 IMPORTS   = oleaut32 ole32
 
diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c
index a43324b3e8f..31047337148 100644
--- a/dlls/dxdiagn/tests/container.c
+++ b/dlls/dxdiagn/tests/container.c
@@ -72,11 +72,11 @@ static void test_GetNumberOfChildContainers(void)
 
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, NULL);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count);
     ok(hr == S_OK,
-       "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
     if (hr == S_OK)
         ok(count != 0, "Expected the number of child containers for the root container to be non-zero\n");
 
@@ -96,10 +96,10 @@ static void test_GetNumberOfProps(void)
     }
 
     hr = IDxDiagContainer_GetNumberOfProps(pddc, NULL);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_GetNumberOfProps(pddc, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
     if (hr == S_OK)
         ok(count == 0, "Expected the number of properties for the root container to be zero\n");
 
@@ -123,36 +123,36 @@ static void test_EnumChildContainerNames(void)
     /* Test various combinations of invalid parameters. */
     hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, NULL, 0);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, NULL, ARRAY_SIZE(container));
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     /* Test the conditions in which the output buffer can be modified. */
     memcpy(container, testW, sizeof(testW));
     hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, 0);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(!memcmp(container, testW, sizeof(testW)),
        "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container));
 
     memcpy(container, testW, sizeof(testW));
     hr = IDxDiagContainer_EnumChildContainerNames(pddc, ~0, container, 0);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(!memcmp(container, testW, sizeof(testW)),
        "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container));
 
     memcpy(container, testW, sizeof(testW));
     hr = IDxDiagContainer_EnumChildContainerNames(pddc, ~0, container, ARRAY_SIZE(container));
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(!memcmp(container, L"\0est", sizeof(L"\0est")),
        "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container));
 
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &maxcount);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
@@ -175,7 +175,7 @@ static void test_EnumChildContainerNames(void)
             /* We should get here when index is one more than the maximum index value. */
             ok(maxcount == index,
                "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG "
-               "on the last index %d, got 0x%08x\n", index, hr);
+               "on the last index %ld, got 0x%08lx\n", index, hr);
             ok(container[0] == '\0',
                "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container));
             break;
@@ -190,7 +190,7 @@ static void test_EnumChildContainerNames(void)
             /* Get the container name to compare against. */
             hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, temp, ARRAY_SIZE(temp));
             ok(hr == S_OK,
-               "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+               "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
 
             /* Show that the DirectX SDK's stipulation that the buffer be at
              * least 256 characters long is a mere suggestion, and smaller sizes
@@ -210,13 +210,13 @@ static void test_EnumChildContainerNames(void)
 
             ok(hr == S_OK,
                "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, "
-               "got hr = 0x%08x, buffersize = %d\n", hr, buffersize);
+               "got hr = 0x%08lx, buffersize = %ld\n", hr, buffersize);
             if (hr == S_OK)
-                trace("pddc[%d] = %s, length = %d\n", index, wine_dbgstr_w(container), buffersize);
+                trace("pddc[%ld] = %s, length = %ld\n", index, wine_dbgstr_w(container), buffersize);
         }
         else
         {
-            ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr);
+            ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08lx\n", hr);
             break;
         }
     }
@@ -241,28 +241,28 @@ static void test_GetChildContainer(void)
     /* Test various combinations of invalid parameters. */
     hr = IDxDiagContainer_GetChildContainer(pddc, NULL, NULL);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     child = (void*)0xdeadbeef;
     hr = IDxDiagContainer_GetChildContainer(pddc, NULL, &child);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(child == (void*)0xdeadbeef, "Expected output pointer to be unchanged, got %p\n", child);
 
     hr = IDxDiagContainer_GetChildContainer(pddc, container, NULL);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     child = (void*)0xdeadbeef;
     hr = IDxDiagContainer_GetChildContainer(pddc, container, &child);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(child == NULL, "Expected output pointer to be NULL, got %p\n", child);
 
     /* Get the name of a suitable child container. */
     hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, ARRAY_SIZE(container));
     ok(hr == S_OK,
-       "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagContainer::EnumChildContainerNames failed\n");
@@ -272,7 +272,7 @@ static void test_GetChildContainer(void)
     child = (void*)0xdeadbeef;
     hr = IDxDiagContainer_GetChildContainer(pddc, container, &child);
     ok(hr == S_OK,
-       "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+       "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
     ok(child != NULL && child != (void*)0xdeadbeef, "Expected a valid output pointer, got %p\n", child);
 
     if (SUCCEEDED(hr))
@@ -283,7 +283,7 @@ static void test_GetChildContainer(void)
          * for multiple calls for the same container name. */
         hr = IDxDiagContainer_GetChildContainer(pddc, container, &ptr);
         ok(hr == S_OK,
-           "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+           "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
         if (SUCCEEDED(hr))
             ok(ptr != child, "Expected the two pointers (%p vs. %p) to be unequal\n", child, ptr);
 
@@ -323,7 +323,7 @@ static void test_dot_parsing(void)
 
     /* Find a container with a child container of its own. */
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
@@ -335,7 +335,7 @@ static void test_dot_parsing(void)
         IDxDiagContainer *child;
 
         hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, containerbufW, ARRAY_SIZE(containerbufW));
-        ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
         if (FAILED(hr))
         {
             skip("IDxDiagContainer::EnumChildContainerNames failed\n");
@@ -343,13 +343,13 @@ static void test_dot_parsing(void)
         }
 
         hr = IDxDiagContainer_GetChildContainer(pddc, containerbufW, &child);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
         if (SUCCEEDED(hr))
         {
             hr = IDxDiagContainer_EnumChildContainerNames(child, 0, childbufW, ARRAY_SIZE(childbufW));
             ok(hr == S_OK || hr == E_INVALIDARG,
-               "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr);
+               "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08lx\n", hr);
             IDxDiagContainer_Release(child);
 
             if (SUCCEEDED(hr))
@@ -382,7 +382,7 @@ static void test_dot_parsing(void)
         trace("Trying container name %s\n", wine_dbgstr_w(dotbufferW));
         hr = IDxDiagContainer_GetChildContainer(pddc, dotbufferW, &child);
         ok(hr == test_strings[i].expect,
-           "Expected IDxDiagContainer::GetChildContainer to return 0x%08x for %s, got 0x%08x\n",
+           "Expected IDxDiagContainer::GetChildContainer to return 0x%08lx for %s, got 0x%08lx\n",
            test_strings[i].expect, wine_dbgstr_w(dotbufferW), hr);
         if (SUCCEEDED(hr))
             IDxDiagContainer_Release(child);
@@ -409,7 +409,7 @@ static void test_EnumPropNames(void)
 
     /* Find a container with a non-zero number of properties. */
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
@@ -419,7 +419,7 @@ static void test_EnumPropNames(void)
     for (index = 0; index < count; index++)
     {
         hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, ARRAY_SIZE(container));
-        ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
         if (FAILED(hr))
         {
             skip("IDxDiagContainer::EnumChildContainerNames failed\n");
@@ -427,12 +427,12 @@ static void test_EnumPropNames(void)
         }
 
         hr = IDxDiagContainer_GetChildContainer(pddc, container, &child);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
         if (SUCCEEDED(hr))
         {
             hr = IDxDiagContainer_GetNumberOfProps(child, &propcount);
-            ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
+            ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
 
             if (!propcount)
             {
@@ -451,17 +451,17 @@ static void test_EnumPropNames(void)
     }
 
     hr = IDxDiagContainer_EnumPropNames(child, ~0, NULL, 0);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     memcpy(property, testW, sizeof(testW));
     hr = IDxDiagContainer_EnumPropNames(child, ~0, property, 0);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(!memcmp(property, testW, sizeof(testW)),
        "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
 
     memcpy(property, testW, sizeof(testW));
     hr = IDxDiagContainer_EnumPropNames(child, ~0, property, ARRAY_SIZE(property));
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(!memcmp(property, testW, sizeof(testW)),
        "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
 
@@ -482,7 +482,7 @@ static void test_EnumPropNames(void)
             /* We should get here when index is one more than the maximum index value. */
             ok(propcount == index,
                "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG "
-               "on the last index %d, got 0x%08x\n", index, hr);
+               "on the last index %ld, got 0x%08lx\n", index, hr);
             ok(!memcmp(property, testW, sizeof(testW)),
                "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
             break;
@@ -495,7 +495,7 @@ static void test_EnumPropNames(void)
                "Expected the property buffer string to be empty, got %s\n", wine_dbgstr_w(property));
             hr = IDxDiagContainer_EnumPropNames(child, index, temp, ARRAY_SIZE(temp));
             ok(hr == S_OK,
-               "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08x\n", hr);
+               "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08lx\n", hr);
 
             /* Show that the DirectX SDK's stipulation that the buffer be at
              * least 256 characters long is a mere suggestion, and smaller sizes
@@ -515,13 +515,13 @@ static void test_EnumPropNames(void)
 
             ok(hr == S_OK,
                "Expected IDxDiagContainer::EnumPropNames to return S_OK, "
-               "got hr = 0x%08x, buffersize = %d\n", hr, buffersize);
+               "got hr = 0x%08lx, buffersize = %ld\n", hr, buffersize);
             if (hr == S_OK)
-                trace("child[%d] = %s, length = %d\n", index, wine_dbgstr_w(property), buffersize);
+                trace("child[%ld] = %s, length = %ld\n", index, wine_dbgstr_w(property), buffersize);
         }
         else
         {
-            ok(0, "IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08x\n", hr);
+            ok(0, "IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08lx\n", hr);
             break;
         }
     }
@@ -553,7 +553,7 @@ static void test_GetProp(void)
 
     /* Find a container with a property. */
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
@@ -563,7 +563,7 @@ static void test_GetProp(void)
     for (index = 0; index < count; index++)
     {
         hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, ARRAY_SIZE(container));
-        ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
         if (FAILED(hr))
         {
             skip("IDxDiagContainer::EnumChildContainerNames failed\n");
@@ -571,13 +571,13 @@ static void test_GetProp(void)
         }
 
         hr = IDxDiagContainer_GetChildContainer(pddc, container, &child);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
         if (SUCCEEDED(hr))
         {
             hr = IDxDiagContainer_EnumPropNames(child, 0, property, ARRAY_SIZE(property));
             ok(hr == S_OK || hr == E_INVALIDARG,
-               "Expected IDxDiagContainer::EnumPropNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr);
+               "Expected IDxDiagContainer::EnumPropNames to return S_OK or E_INVALIDARG, got 0x%08lx\n", hr);
 
             if (SUCCEEDED(hr))
                 break;
@@ -596,32 +596,32 @@ static void test_GetProp(void)
     }
 
     hr = IDxDiagContainer_GetProp(child, NULL, NULL);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     V_VT(&var) = 0xdead;
     hr = IDxDiagContainer_GetProp(child, NULL, &var);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
 
     hr = IDxDiagContainer_GetProp(child, L"", NULL);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     V_VT(&var) = 0xdead;
     hr = IDxDiagContainer_GetProp(child, L"", &var);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
 
     hr = IDxDiagContainer_GetProp(child, testW, NULL);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     V_VT(&var) = 0xdead;
     hr = IDxDiagContainer_GetProp(child, testW, &var);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
     ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
 
     VariantInit(&var);
     hr = IDxDiagContainer_GetProp(child, property, &var);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr);
     ok(V_VT(&var) != VT_EMPTY, "Expected the variant to be modified, got %d\n", V_VT(&var));
 
     /* Since the documentation for IDxDiagContainer::GetProp claims that the
@@ -631,7 +631,7 @@ static void test_GetProp(void)
     /* Try an invalid variant type. */
     V_VT(&var) = 0xdead;
     hr = IDxDiagContainer_GetProp(child, property, &var);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr);
     ok(V_VT(&var) != 0xdead, "Expected the variant to be modified, got %d\n", V_VT(&var));
 
     /* Try passing a variant with a locked SAFEARRAY. */
@@ -644,16 +644,16 @@ static void test_GetProp(void)
     V_ARRAY(&var) = sa;
 
     hr = SafeArrayLock(sa);
-    ok(hr == S_OK, "Expected SafeArrayLock to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected SafeArrayLock to return S_OK, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_GetProp(child, property, &var);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr);
     ok(V_VT(&var) != (VT_ARRAY | VT_UI1), "Expected the variant to be modified\n");
 
     hr = SafeArrayUnlock(sa);
-    ok(hr == S_OK, "Expected SafeArrayUnlock to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected SafeArrayUnlock to return S_OK, got 0x%08lx\n", hr);
     hr = SafeArrayDestroy(sa);
-    ok(hr == S_OK, "Expected SafeArrayDestroy to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected SafeArrayDestroy to return S_OK, got 0x%08lx\n", hr);
 
     /* Determine whether GetProp calls VariantClear on the passed variant. */
     V_VT(&var) = VT_UNKNOWN;
@@ -661,12 +661,12 @@ static void test_GetProp(void)
     IDxDiagContainer_AddRef(child);
 
     hr = IDxDiagContainer_GetProp(child, property, &var);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr);
     ok(V_VT(&var) != VT_UNKNOWN, "Expected the variant to be modified\n");
 
     IDxDiagContainer_AddRef(child);
     ref = IDxDiagContainer_Release(child);
-    ok(ref == 2, "Expected reference count to be 2, got %u\n", ref);
+    ok(ref == 2, "Expected reference count to be 2, got %lu\n", ref);
     IDxDiagContainer_Release(child);
 
     IDxDiagContainer_Release(child);
@@ -695,7 +695,7 @@ static void test_root_children(void)
 
     /* Verify the identity and ordering of the root container's children. */
     hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
@@ -703,7 +703,7 @@ static void test_root_children(void)
     }
 
     ok(count == ARRAY_SIZE(root_children),
-       "Got unexpected count %u for the number of child containers\n", count);
+       "Got unexpected count %lu for the number of child containers\n", count);
 
     if (count != ARRAY_SIZE(root_children))
     {
@@ -720,18 +720,18 @@ static void test_root_children(void)
         {
             ok(index == count,
                "Expected IDxDiagContainer::EnumChildContainerNames to return "
-               "E_INVALIDARG on the last index %u\n", count);
+               "E_INVALIDARG on the last index %lu\n", count);
             break;
         }
         else if (hr == S_OK)
         {
             ok(!lstrcmpW(container, root_children[index]),
-               "Expected container %s for index %u, got %s\n",
+               "Expected container %s for index %lu, got %s\n",
                wine_dbgstr_w(root_children[index]), index, wine_dbgstr_w(container));
         }
         else
         {
-            ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr);
+            ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08lx\n", hr);
             break;
         }
     }
@@ -751,9 +751,9 @@ static void test_container_properties(IDxDiagContainer *container, const struct
         DWORD prop_count;
 
         hr = IDxDiagContainer_GetNumberOfProps(container, &prop_count);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
         if (hr == S_OK)
-            ok(prop_count == 0, "Expected container property count to be zero, got %u\n", prop_count);
+            ok(prop_count == 0, "Expected container property count to be zero, got %lu\n", prop_count);
     }
     else
     {
@@ -766,7 +766,7 @@ static void test_container_properties(IDxDiagContainer *container, const struct
         for (i = 0; i < len; i++)
         {
             hr = IDxDiagContainer_GetProp(container, property_tests[i].prop, &var);
-            ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08x\n",
+            ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08lx\n",
                i, wine_dbgstr_w(property_tests[i].prop), hr);
 
             if (hr == S_OK)
@@ -829,10 +829,10 @@ static void test_DxDiag_SystemInfo(void)
     }
 
     hr = IDxDiagContainer_GetChildContainer(pddc, L"", &container2);
-    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_SystemInfo", &container);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
     if (hr == S_OK)
     {
@@ -841,7 +841,7 @@ static void test_DxDiag_SystemInfo(void)
 
         container2 = NULL;
         hr = IDxDiagContainer_GetChildContainer(container, L"", &container2);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
         ok(container2 != NULL, "Expected container2 != NULL\n");
         ok(container2 != container, "Expected container != container2\n");
 
@@ -892,18 +892,18 @@ static void test_DxDiag_DisplayDevices(void)
     }
 
     hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_DisplayDevices", &display_cont);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
     if (hr != S_OK)
         goto cleanup;
 
     hr = IDxDiagContainer_GetNumberOfProps(display_cont, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
     if (hr == S_OK)
-        ok(count == 0, "Expected count to be 0, got %u\n", count);
+        ok(count == 0, "Expected count to be 0, got %lu\n", count);
 
     hr = IDxDiagContainer_GetNumberOfChildContainers(display_cont, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
 
     if (hr != S_OK)
         goto cleanup;
@@ -914,10 +914,10 @@ static void test_DxDiag_DisplayDevices(void)
         IDxDiagContainer *child;
 
         hr = IDxDiagContainer_EnumChildContainerNames(display_cont, i, child_container, ARRAY_SIZE(child_container));
-        ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
 
         hr = IDxDiagContainer_GetChildContainer(display_cont, child_container, &child);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
         if (hr == S_OK)
         {
@@ -954,14 +954,14 @@ static void test_DxDiag_SoundDevices(void)
     }
 
     hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_DirectSound.DxDiag_SoundDevices", &sound_cont);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_GetNumberOfProps(sound_cont, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
-    ok(count == 0, "Expected count to be 0, got %u\n", count);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
+    ok(count == 0, "Expected count to be 0, got %lu\n", count);
 
     hr = IDxDiagContainer_GetNumberOfChildContainers(sound_cont, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
 
     for (i = 0; i < count; i++)
     {
@@ -969,17 +969,17 @@ static void test_DxDiag_SoundDevices(void)
         WCHAR child_container[256];
 
         hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, ARRAY_SIZE(child_container));
-        ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
 
         hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
         trace("Testing container %s\n", wine_dbgstr_w(child_container));
         test_container_properties(child, property_tests, ARRAY_SIZE(property_tests));
 
         child2 = NULL;
         hr = IDxDiagContainer_GetChildContainer(child, L"", &child2);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
         ok(child2 != NULL, "Expected child2 != NULL\n");
         ok(child2 != child, "Expected child != child2\n");
 
@@ -1013,14 +1013,14 @@ static void test_DxDiag_SoundCaptureDevices(void)
     }
 
     hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_DirectSound.DxDiag_SoundCaptureDevices", &sound_cont);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
     hr = IDxDiagContainer_GetNumberOfProps(sound_cont, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
-    ok(count == 0, "Expected count to be 0, got %u\n", count);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
+    ok(count == 0, "Expected count to be 0, got %lu\n", count);
 
     hr = IDxDiagContainer_GetNumberOfChildContainers(sound_cont, &count);
-    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
 
     for (i = 0; i < count; i++)
     {
@@ -1028,10 +1028,10 @@ static void test_DxDiag_SoundCaptureDevices(void)
         IDxDiagContainer *child;
 
         hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, ARRAY_SIZE(child_container));
-        ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
 
         hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child);
-        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+        ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
 
         trace("Testing container %s\n", wine_dbgstr_w(child_container));
         test_container_properties(child, property_tests, ARRAY_SIZE(property_tests));
diff --git a/dlls/dxdiagn/tests/provider.c b/dlls/dxdiagn/tests/provider.c
index 69006f06408..951e5f1fac3 100644
--- a/dlls/dxdiagn/tests/provider.c
+++ b/dlls/dxdiagn/tests/provider.c
@@ -34,7 +34,7 @@ static void test_Initialize(void)
                           &IID_IDxDiagProvider, (LPVOID*)&pddp);
     ok(hr == S_OK ||
        broken(hr == REGDB_E_CLASSNOTREG), /* Clean W2K3 */
-       "Creating a IDxDiagProvider instance failed with %x\n", hr);
+       "Creating a IDxDiagProvider instance failed with %lx\n", hr);
     if (FAILED(hr))
     {
         skip("Failed to create a IDxDiagProvider instance\n");
@@ -44,18 +44,18 @@ static void test_Initialize(void)
     /* Test passing a NULL DXDIAG_INIT_PARAMS pointer. */
     hr = IDxDiagProvider_Initialize(pddp, NULL);
     ok(hr == E_POINTER,
-       "Expected IDxDiagProvider::Initialize to return E_POINTER, got %x\n", hr);
+       "Expected IDxDiagProvider::Initialize to return E_POINTER, got %lx\n", hr);
 
     /* Test passing invalid dwSize values. */
     params.dwSize = 0;
     hr = IDxDiagProvider_Initialize(pddp, &params);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
+       "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
 
     params.dwSize = sizeof(params) + 1;
     hr = IDxDiagProvider_Initialize(pddp, &params);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
+       "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
 
     /* Test passing an unexpected dwDxDiagHeaderVersion value. */
     params.dwSize = sizeof(params);
@@ -64,7 +64,7 @@ static void test_Initialize(void)
     params.pReserved = NULL;
     hr = IDxDiagProvider_Initialize(pddp, &params);
     ok(hr == E_INVALIDARG,
-       "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
+       "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
 
     /* Setting pReserved to a non-NULL value causes a crash on Windows. */
     if (0)
@@ -73,7 +73,7 @@ static void test_Initialize(void)
         params.bAllowWHQLChecks = FALSE;
         params.pReserved = (VOID*)0xdeadbeef;
         hr = IDxDiagProvider_Initialize(pddp, &params);
-        trace("IDxDiagProvider::Initialize returned %x\n", hr);
+        trace("IDxDiagProvider::Initialize returned %lx\n", hr);
     }
 
     /* Test passing an appropriately initialized DXDIAG_INIT_PARAMS. */
@@ -81,11 +81,11 @@ static void test_Initialize(void)
     params.bAllowWHQLChecks = FALSE;
     params.pReserved = NULL;
     hr = IDxDiagProvider_Initialize(pddp, &params);
-    ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
 
     /* Test initializing multiple times. */
     hr = IDxDiagProvider_Initialize(pddp, &params);
-    ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
 
     IDxDiagProvider_Release(pddp);
 }
@@ -101,7 +101,7 @@ static void test_GetRootContainer(void)
                           &IID_IDxDiagProvider, (LPVOID*)&pddp);
     ok(hr == S_OK ||
        broken(hr == REGDB_E_CLASSNOTREG), /* Clean W2K3 */
-       "Creating a IDxDiagProvider instance failed with %x\n", hr);
+       "Creating a IDxDiagProvider instance failed with %lx\n", hr);
     if (FAILED(hr))
     {
         skip("Failed to create a IDxDiagProvider instance\n");
@@ -111,18 +111,18 @@ static void test_GetRootContainer(void)
     /* Test calling IDxDiagProvider::GetRootContainer before initialization. */
     hr = IDxDiagProvider_GetRootContainer(pddp, NULL);
     ok(hr == CO_E_NOTINITIALIZED,
-       "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr);
+       "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %lx\n", hr);
 
     hr = IDxDiagProvider_GetRootContainer(pddp, &pddc);
     ok(hr == CO_E_NOTINITIALIZED,
-       "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr);
+       "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %lx\n", hr);
 
     params.dwSize = sizeof(params);
     params.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION;
     params.bAllowWHQLChecks = FALSE;
     params.pReserved = NULL;
     hr = IDxDiagProvider_Initialize(pddp, &params);
-    ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
     if (FAILED(hr))
     {
         skip("IDxDiagProvider::Initialize failed\n");
@@ -134,16 +134,16 @@ static void test_GetRootContainer(void)
     if (0)
     {
         hr = IDxDiagProvider_GetRootContainer(pddp, NULL);
-        trace("IDxDiagProvider::GetRootContainer returned %x\n", hr);
+        trace("IDxDiagProvider::GetRootContainer returned %lx\n", hr);
     }
 
     hr = IDxDiagProvider_GetRootContainer(pddp, &pddc);
-    ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %lx\n", hr);
 
     /* IDxDiagProvider::GetRootContainer creates new instances of the root
      * container rather than maintain a static root container. */
     hr = IDxDiagProvider_GetRootContainer(pddp, &pddc2);
-    ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %x\n", hr);
+    ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %lx\n", hr);
     ok(pddc != pddc2, "Expected the two pointers (%p vs. %p) to be unequal\n", pddc, pddc2);
 
     IDxDiagContainer_Release(pddc2);




More information about the wine-devel mailing list