Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 4 participants
- 84517 discussions
Changes in version 2 of this patchset:
*) Rename resource_acquire to resource_reference.
*) Simplify the wrap-around logic (thanks Jan!).
Some updated benchmarking information: Keeping a separate counter for fencing instead of re-using
head and tail has a measurable performance impact in my draw overhead microbenchmark.
In World of Tanks the full 32 bit head/tail numbers wrap around within 3-4 minutes rather than a
few hours as I concluded earlier from my microbenchmarks. In a way this is welcome - the wrap-around
logic is actually used rather than untested dead code. It might make the phantom waits described in
patch 2 a bit more likely though. Should this become an issue I believe we can change head and tail
to SIZE_T or ULONGLONG. I could not measure any performance impact of a 64 bit counter vs a 32 bit
counter. I tested it in 32 bit client on a 64 bit CPU. I don't have a multicore 32 bit CPU available
for testing in a pure 32 bit setup.
This is the patchset described in https://www.winehq.org/pipermail/wine-devel/2022-January/204020.html .
It simplifies and speeds up d3d resource tracking in a few ways:
*) Completely remove any burden on the CS thread.
*) Replace interlocked ops on the client thread with a plain assignment.
*) Piggy-pack onto the queue's head and tail counters, which we already
increment with interlocked ops.
I tested the impact with a microbenchmark:
https://github.com/stefand/perftest/blob/main/resource_tracking_d3d11/resou…
Depending on the CPU it doubles or tripples draw speed in that microbenchmark. In real games the
effect is much less pronounced, but I do see about a 2% gain in World of Tanks. I also see a gain
in Rocket League, but only if I hack away other known issues with Rocket League (UpdateSubResource
in particular).
I have further improvements to resource tracking in my mind that can be done on top of these patches:
*) Separate read and write access times.
*) Remove draw and compute tracking for d3d10+ clients and only track staging resources.
Matteo had some ideas to make the queue multi-writer thread safe to further reduce the use of
wined3d_cs. This patchset makes this a bit more complicated because the head value cannot be infered
from the return value of require_space() and thus needs to be passed around separately to submit().
This can be done either with thread local storage or via a separate parameter to require_space() and
submit().
Stefan Dösinger (5):
wined3d: Use extra bits in the queue head and tail counters.
wined3d: Use the default queue index for resource fencing.
wined3d: Remove the no-op wined3d_resource_release.
wined3d: Remove the resource_acquire call in resource_cleanup.
wined3d: Rename resource_acquire to resource_reference.
dlls/wined3d/cs.c | 276 +++++++++------------------------
dlls/wined3d/resource.c | 2 -
dlls/wined3d/wined3d_private.h | 68 ++++++--
3 files changed, 123 insertions(+), 223 deletions(-)
--
2.34.1
4
14
[PATCH] dlls/windows.media.speech/tests: enable compilation with long types
by Eric Pouech March 10, 2022
by Eric Pouech March 10, 2022
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/windows.media.speech/tests/Makefile.in | 1
dlls/windows.media.speech/tests/speech.c | 60 ++++++++++++++-------------
2 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/dlls/windows.media.speech/tests/Makefile.in b/dlls/windows.media.speech/tests/Makefile.in
index e1616991573..2ee10d3db21 100644
--- a/dlls/windows.media.speech/tests/Makefile.in
+++ b/dlls/windows.media.speech/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = windows.media.speech.dll
IMPORTS = combase uuid
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 38fd5c90dd0..df00f407bc7 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -56,10 +56,10 @@ static void test_SpeechSynthesizer(void)
ULONG ref;
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoInitialize failed, hr %#lx\n", hr);
hr = WindowsCreateString(speech_synthesizer_name, wcslen(speech_synthesizer_name), &str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hdll = LoadLibraryW(L"windows.media.speech.dll");
if (hdll)
@@ -68,31 +68,31 @@ static void test_SpeechSynthesizer(void)
ok(!!pDllGetActivationFactory, "DllGetActivationFactory not found.\n");
hr = WindowsCreateString(unknown_class_name, wcslen(unknown_class_name), &str2);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = pDllGetActivationFactory(str2, &factory);
- ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Got unexpected hr %#lx.\n", hr);
WindowsDeleteString(str2);
hr = WindowsCreateString(speech_synthesizer_name2, wcslen(speech_synthesizer_name2), &str2);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = pDllGetActivationFactory(str2, &factory2);
- ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Got unexpected hr %#lx.\n", hr);
WindowsDeleteString(str2);
hr = pDllGetActivationFactory(str, &factory2);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
}
else
{
- win_skip("Failed to load library, err %u.\n", GetLastError());
+ win_skip("Failed to load library, err %lu.\n", GetLastError());
}
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- ok(hr == S_OK, "RoGetActivationFactory failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoGetActivationFactory failed, hr %#lx\n", hr);
if (hdll)
{
@@ -102,47 +102,47 @@ static void test_SpeechSynthesizer(void)
}
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IInstalledVoicesStatic, (void **)&voices_static);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#lx\n", hr);
hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
ok(tmp_inspectable == inspectable, "IInstalledVoicesStatic_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
ok(tmp_agile_object == agile_object, "IInstalledVoicesStatic_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object);
IAgileObject_Release(tmp_agile_object);
hr = IInstalledVoicesStatic_get_AllVoices(voices_static, &voices);
- ok(hr == S_OK, "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IInstalledVoicesStatic_get_AllVoices failed, hr %#lx\n", hr);
hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#lx\n", hr);
ok(tmp_inspectable != inspectable, "IVectorView_VoiceInformation_QueryInterface voices returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == E_NOINTERFACE, "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr);
+ ok(hr == E_NOINTERFACE, "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#lx\n", hr);
size = 0xdeadbeef;
hr = IVectorView_VoiceInformation_get_Size(voices, &size);
- ok(hr == S_OK, "IVectorView_VoiceInformation_get_Size voices failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_VoiceInformation_get_Size voices failed, hr %#lx\n", hr);
todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size);
voice = (IVoiceInformation *)0xdeadbeef;
hr = IVectorView_VoiceInformation_GetAt(voices, size, &voice);
- ok(hr == E_BOUNDS, "IVectorView_VoiceInformation_GetAt failed, hr %#x\n", hr);
+ ok(hr == E_BOUNDS, "IVectorView_VoiceInformation_GetAt failed, hr %#lx\n", hr);
ok(voice == NULL, "IVectorView_VoiceInformation_GetAt returned %p\n", voice);
hr = IVectorView_VoiceInformation_GetMany(voices, size, 1, &voice, &size);
- ok(hr == S_OK, "IVectorView_VoiceInformation_GetMany failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_VoiceInformation_GetMany failed, hr %#lx\n", hr);
ok(size == 0, "IVectorView_VoiceInformation_GetMany returned count %u\n", size);
IVectorView_VoiceInformation_Release(voices);
@@ -153,25 +153,25 @@ static void test_SpeechSynthesizer(void)
IInspectable_Release(inspectable);
hr = IActivationFactory_QueryInterface(factory, &IID_ISpeechSynthesizer, (void **)&synthesizer);
- ok(hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
hr = RoActivateInstance(str, &inspectable);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IInspectable_QueryInterface(inspectable, &IID_ISpeechSynthesizer, (void **)&synthesizer);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IInspectable_QueryInterface(inspectable, &IID_IClosable, (void **)&closable);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ref = IClosable_Release(closable);
- ok(ref == 2, "Got unexpected ref %u.\n", ref);
+ ok(ref == 2, "Got unexpected ref %lu.\n", ref);
ref = ISpeechSynthesizer_Release(synthesizer);
- ok(ref == 1, "Got unexpected ref %u.\n", ref);
+ ok(ref == 1, "Got unexpected ref %lu.\n", ref);
ref = IInspectable_Release(inspectable);
- ok(!ref, "Got unexpected ref %u.\n", ref);
+ ok(!ref, "Got unexpected ref %lu.\n", ref);
IActivationFactory_Release(factory);
WindowsDeleteString(str);
@@ -188,13 +188,13 @@ static void test_VoiceInformation(void)
HRESULT hr;
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoInitialize failed, hr %#lx\n", hr);
hr = WindowsCreateString(voice_information_name, wcslen(voice_information_name), &str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#lx\n", hr);
WindowsDeleteString(str);
4
6
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wtsapi32/tests/Makefile.in | 1
dlls/wtsapi32/tests/wtsapi.c | 90 ++++++++++++++++++++-------------------
2 files changed, 45 insertions(+), 46 deletions(-)
diff --git a/dlls/wtsapi32/tests/Makefile.in b/dlls/wtsapi32/tests/Makefile.in
index 1b18073bdac..57014aea938 100644
--- a/dlls/wtsapi32/tests/Makefile.in
+++ b/dlls/wtsapi32/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wtsapi32.dll
IMPORTS = wtsapi32 advapi32 psapi
diff --git a/dlls/wtsapi32/tests/wtsapi.c b/dlls/wtsapi32/tests/wtsapi.c
index 3eec81d8556..32caa05588c 100644
--- a/dlls/wtsapi32/tests/wtsapi.c
+++ b/dlls/wtsapi32/tests/wtsapi.c
@@ -64,7 +64,7 @@ static void check_wts_process_info(const WTS_PROCESS_INFOW *info, DWORD count)
nt_length *= 2;
nt_info = realloc(nt_info, nt_length);
}
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
for (i = 0; i < count; i++)
{
@@ -75,11 +75,11 @@ static void check_wts_process_info(const WTS_PROCESS_INFOW *info, DWORD count)
DWORD size;
nt_process = find_nt_process_info(nt_info, info[i].ProcessId);
- ok(!!nt_process, "failed to find pid %#x\n", info[i].ProcessId);
+ ok(!!nt_process, "failed to find pid %#lx\n", info[i].ProcessId);
- winetest_push_context("pid %#x", info[i].ProcessId);
+ winetest_push_context("pid %#lx", info[i].ProcessId);
- ok(info[i].SessionId == nt_process->SessionId, "expected session id %#x, got %#x\n",
+ ok(info[i].SessionId == nt_process->SessionId, "expected session id %#lx, got %#lx\n",
nt_process->SessionId, info[i].SessionId);
ok(!memcmp(info[i].pProcessName, nt_process->ProcessName.Buffer, nt_process->ProcessName.Length),
@@ -89,9 +89,9 @@ static void check_wts_process_info(const WTS_PROCESS_INFOW *info, DWORD count)
if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, info[i].ProcessId)))
{
ret = OpenProcessToken(process, TOKEN_QUERY, &token);
- ok(ret, "failed to open token, error %u\n", GetLastError());
+ ok(ret, "failed to open token, error %lu\n", GetLastError());
ret = GetTokenInformation(token, TokenUser, sid_buffer, sizeof(sid_buffer), &size);
- ok(ret, "failed to get token user, error %u\n", GetLastError());
+ ok(ret, "failed to get token user, error %lu\n", GetLastError());
ok(EqualSid(info[i].pUserSid, sid->Sid), "SID did not match\n");
CloseHandle(token);
CloseHandle(process);
@@ -117,33 +117,33 @@ static void test_WTSEnumerateProcessesW(void)
SetLastError(0xdeadbeef);
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 1, 1, &info, &count);
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
- ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %ld\n", GetLastError());
WTSFreeMemory(info);
info = NULL;
SetLastError(0xdeadbeef);
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 0, &info, &count);
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
- ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %ld\n", GetLastError());
WTSFreeMemory(info);
info = NULL;
SetLastError(0xdeadbeef);
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 2, &info, &count);
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
- ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %ld\n", GetLastError());
WTSFreeMemory(info);
SetLastError(0xdeadbeef);
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, NULL, &count);
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
- ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %ld\n", GetLastError());
info = NULL;
SetLastError(0xdeadbeef);
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, NULL);
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
- ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %ld\n", GetLastError());
WTSFreeMemory(info);
count = 0;
@@ -151,7 +151,7 @@ static void test_WTSEnumerateProcessesW(void)
SetLastError(0xdeadbeef);
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, &count);
ok(ret, "expected success\n");
- ok(!GetLastError(), "got error %u\n", GetLastError());
+ ok(!GetLastError(), "got error %lu\n", GetLastError());
check_wts_process_info(info, count);
WTSFreeMemory(info);
@@ -167,14 +167,14 @@ static void test_WTSEnumerateProcessesW(void)
count = 0xdeadbeef;
ret = pWTSEnumerateProcessesExW(WTS_CURRENT_SERVER_HANDLE, &level, WTS_ANY_SESSION, NULL, &count);
ok(!ret, "expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError());
- ok(count == 0xdeadbeef, "got count %u\n", count);
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
+ ok(count == 0xdeadbeef, "got count %lu\n", count);
info = (void *)0xdeadbeef;
SetLastError(0xdeadbeef);
ret = pWTSEnumerateProcessesExW(WTS_CURRENT_SERVER_HANDLE, &level, WTS_ANY_SESSION, (WCHAR **)&info, NULL);
ok(!ret, "expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
ok(info == (void *)0xdeadbeef, "got info %p\n", info);
info = NULL;
@@ -182,7 +182,7 @@ static void test_WTSEnumerateProcessesW(void)
SetLastError(0xdeadbeef);
ret = pWTSEnumerateProcessesExW(WTS_CURRENT_SERVER_HANDLE, &level, WTS_ANY_SESSION, (WCHAR **)&info, &count);
ok(ret, "expected success\n");
- ok(!GetLastError(), "got error %u\n", GetLastError());
+ ok(!GetLastError(), "got error %lu\n", GetLastError());
check_wts_process_info(info, count);
pWTSFreeMemoryExW(WTSTypeProcessInfoLevel0, info, count);
}
@@ -197,91 +197,91 @@ static void test_WTSQuerySessionInformation(void)
SetLastError(0xdeadbeef);
count = 0;
ret = WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, NULL, &count);
- ok(!ret, "got %u\n", GetLastError());
- ok(count == 0, "got %u\n", count);
- ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %u\n", GetLastError());
+ ok(!ret, "got %lu\n", GetLastError());
+ ok(count == 0, "got %lu\n", count);
+ ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
count = 1;
ret = WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, NULL, &count);
- ok(!ret, "got %u\n", GetLastError());
- ok(count == 1, "got %u\n", count);
- ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %u\n", GetLastError());
+ ok(!ret, "got %lu\n", GetLastError());
+ ok(count == 1, "got %lu\n", count);
+ ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, &buf1, NULL);
- ok(!ret, "got %u\n", GetLastError());
- ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %u\n", GetLastError());
+ ok(!ret, "got %lu\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %lu\n", GetLastError());
count = 0;
buf1 = NULL;
ret = WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, &buf1, &count);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(buf1 != NULL, "buf not set\n");
- ok(count == (lstrlenW(buf1) + 1) * sizeof(WCHAR), "expected %u, got %u\n", (lstrlenW(buf1) + 1) * sizeof(WCHAR), count);
+ ok(count == (lstrlenW(buf1) + 1) * sizeof(WCHAR), "expected %Iu, got %lu\n", (lstrlenW(buf1) + 1) * sizeof(WCHAR), count);
tempsize = UNLEN + 1;
GetUserNameW(usernameW, &tempsize);
/* Windows Vista, 7 and 8 return uppercase username, while the rest return lowercase. */
ok(!wcsicmp(buf1, usernameW), "expected %s, got %s\n", wine_dbgstr_w(usernameW), wine_dbgstr_w(buf1));
- ok(count == tempsize * sizeof(WCHAR), "expected %u, got %u\n", tempsize * sizeof(WCHAR), count);
+ ok(count == tempsize * sizeof(WCHAR), "expected %Iu, got %lu\n", tempsize * sizeof(WCHAR), count);
WTSFreeMemory(buf1);
count = 0;
buf1 = NULL;
ret = WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSDomainName, &buf1, &count);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(buf1 != NULL, "buf not set\n");
- ok(count == (lstrlenW(buf1) + 1) * sizeof(WCHAR), "expected %u, got %u\n", (lstrlenW(buf1) + 1) * sizeof(WCHAR), count);
+ ok(count == (lstrlenW(buf1) + 1) * sizeof(WCHAR), "expected %Iu, got %lu\n", (lstrlenW(buf1) + 1) * sizeof(WCHAR), count);
tempsize = MAX_COMPUTERNAME_LENGTH + 1;
GetComputerNameW(computernameW, &tempsize);
/* Windows Vista, 7 and 8 return uppercase computername, while the rest return lowercase. */
ok(!wcsicmp(buf1, computernameW), "expected %s, got %s\n", wine_dbgstr_w(computernameW), wine_dbgstr_w(buf1));
- ok(count == (tempsize + 1) * sizeof(WCHAR), "expected %u, got %u\n", (tempsize + 1) * sizeof(WCHAR), count);
+ ok(count == (tempsize + 1) * sizeof(WCHAR), "expected %Iu, got %lu\n", (tempsize + 1) * sizeof(WCHAR), count);
WTSFreeMemory(buf1);
SetLastError(0xdeadbeef);
count = 0;
ret = WTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, NULL, &count);
- ok(!ret, "got %u\n", GetLastError());
- ok(count == 0, "got %u\n", count);
- ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %u\n", GetLastError());
+ ok(!ret, "got %lu\n", GetLastError());
+ ok(count == 0, "got %lu\n", count);
+ ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
count = 1;
ret = WTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, NULL, &count);
- ok(!ret, "got %u\n", GetLastError());
- ok(count == 1, "got %u\n", count);
- ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %u\n", GetLastError());
+ ok(!ret, "got %lu\n", GetLastError());
+ ok(count == 1, "got %lu\n", count);
+ ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, &buf2, NULL);
- ok(!ret, "got %u\n", GetLastError());
- ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %u\n", GetLastError());
+ ok(!ret, "got %lu\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "got %lu\n", GetLastError());
count = 0;
buf2 = NULL;
ret = WTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, &buf2, &count);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(buf2 != NULL, "buf not set\n");
- ok(count == lstrlenA(buf2) + 1, "expected %u, got %u\n", lstrlenA(buf2) + 1, count);
+ ok(count == lstrlenA(buf2) + 1, "expected %u, got %lu\n", lstrlenA(buf2) + 1, count);
tempsize = UNLEN + 1;
GetUserNameA(username, &tempsize);
/* Windows Vista, 7 and 8 return uppercase username, while the rest return lowercase. */
ok(!stricmp(buf2, username), "expected %s, got %s\n", username, buf2);
- ok(count == tempsize, "expected %u, got %u\n", tempsize, count);
+ ok(count == tempsize, "expected %lu, got %lu\n", tempsize, count);
WTSFreeMemory(buf2);
count = 0;
buf2 = NULL;
ret = WTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSDomainName, &buf2, &count);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(buf2 != NULL, "buf not set\n");
- ok(count == lstrlenA(buf2) + 1, "expected %u, got %u\n", lstrlenA(buf2) + 1, count);
+ ok(count == lstrlenA(buf2) + 1, "expected %u, got %lu\n", lstrlenA(buf2) + 1, count);
tempsize = MAX_COMPUTERNAME_LENGTH + 1;
GetComputerNameA(computername, &tempsize);
/* Windows Vista, 7 and 8 return uppercase computername, while the rest return lowercase. */
ok(!stricmp(buf2, computername), "expected %s, got %s\n", computername, buf2);
- ok(count == tempsize + 1, "expected %u, got %u\n", tempsize + 1, count);
+ ok(count == tempsize + 1, "expected %lu, got %lu\n", tempsize + 1, count);
WTSFreeMemory(buf2);
}
@@ -292,7 +292,7 @@ static void test_WTSQueryUserToken(void)
SetLastError(0xdeadbeef);
ret = WTSQueryUserToken(WTS_CURRENT_SESSION, NULL);
ok(!ret, "expected WTSQueryUserToken to fail\n");
- ok(GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
+ ok(GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %ld\n", GetLastError());
}
START_TEST (wtsapi)
1
0
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wsdapi/tests/Makefile.in | 1
dlls/wsdapi/tests/address.c | 108 ++++++++++++++++++-----------------
dlls/wsdapi/tests/discovery.c | 108 ++++++++++++++++++-----------------
dlls/wsdapi/tests/msgparams.c | 86 ++++++++++++++--------------
dlls/wsdapi/tests/xml.c | 126 +++++++++++++++++++++--------------------
5 files changed, 214 insertions(+), 215 deletions(-)
diff --git a/dlls/wsdapi/tests/Makefile.in b/dlls/wsdapi/tests/Makefile.in
index 2198c066369..eaefa3a962b 100644
--- a/dlls/wsdapi/tests/Makefile.in
+++ b/dlls/wsdapi/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wsdapi.dll
IMPORTS = wsdapi ole32 oleaut32 user32 ws2_32 advapi32 iphlpapi rpcrt4
diff --git a/dlls/wsdapi/tests/address.c b/dlls/wsdapi/tests/address.c
index dd3e048c25c..4e021a4e65a 100644
--- a/dlls/wsdapi/tests/address.c
+++ b/dlls/wsdapi/tests/address.c
@@ -39,39 +39,39 @@ static void CreateUdpAddress_tests(void)
ULONG ref;
rc = WSDCreateUdpAddress(NULL);
- ok((rc == E_POINTER) || (rc == E_INVALIDARG), "WSDCreateUDPAddress(NULL) failed: %08x\n", rc);
+ ok((rc == E_POINTER) || (rc == E_INVALIDARG), "WSDCreateUDPAddress(NULL) failed: %08lx\n", rc);
rc = WSDCreateUdpAddress(&udpAddress);
- ok(rc == S_OK, "WSDCreateUDPAddress(NULL, &udpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUDPAddress(NULL, &udpAddress) failed: %08lx\n", rc);
ok(udpAddress != NULL, "WSDCreateUDPAddress(NULL, &udpAddress) failed: udpAddress == NULL\n");
/* Try to query for objects */
rc = IWSDUdpAddress_QueryInterface(udpAddress, &IID_IWSDUdpAddress, (LPVOID*)&udpAddress2);
- ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IWSDUdpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IWSDUdpAddress) failed: %08lx\n", rc);
if (rc == S_OK)
IWSDUdpAddress_Release(udpAddress2);
rc = IWSDUdpAddress_QueryInterface(udpAddress, &IID_IWSDTransportAddress, (LPVOID*)&transportAddress);
- ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IID_WSDTransportAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IID_WSDTransportAddress) failed: %08lx\n", rc);
if (rc == S_OK)
IWSDTransportAddress_Release(transportAddress);
rc = IWSDUdpAddress_QueryInterface(udpAddress, &IID_IWSDAddress, (LPVOID*)&address);
- ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IWSDAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IWSDAddress) failed: %08lx\n", rc);
if (rc == S_OK)
IWSDAddress_Release(address);
rc = IWSDUdpAddress_QueryInterface(udpAddress, &IID_IUnknown, (LPVOID*)&unknown);
- ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpAddress_QueryInterface(IID_IUnknown) failed: %08lx\n", rc);
if (rc == S_OK)
IUnknown_Release(unknown);
ref = IWSDUdpAddress_Release(udpAddress);
- ok(ref == 0, "IWSDUdpAddress_Release() has %d references, should have 0\n", ref);
+ ok(ref == 0, "IWSDUdpAddress_Release() has %ld references, should have 0\n", ref);
}
static void GetSetTransportAddress_udp_tests(void)
@@ -89,52 +89,52 @@ static void GetSetTransportAddress_udp_tests(void)
ok(ret == 0, "WSAStartup failed: %d\n", ret);
rc = WSDCreateUdpAddress(&udpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08lx\n", rc);
ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n");
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc);
- ok(returnedAddress == NULL, "GetTransportAddress returned unexpected address: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08lx\n", rc);
+ ok(returnedAddress == NULL, "GetTransportAddress returned unexpected address: %08lx\n", rc);
/* Try setting a null address */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, NULL);
- ok(rc == E_INVALIDARG, "SetTransportAddress(NULL) returned unexpected result: %08x\n", rc);
+ ok(rc == E_INVALIDARG, "SetTransportAddress(NULL) returned unexpected result: %08lx\n", rc);
/* Try setting an invalid address */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, L"not/valid");
- ok(rc == HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND), "SetTransportAddress(invalidAddress) returned unexpected result: %08x\n", rc);
+ ok(rc == HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND), "SetTransportAddress(invalidAddress) returned unexpected result: %08lx\n", rc);
/* Try setting an IPv4 address */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, ipv4Address);
- ok(rc == S_OK, "SetTransportAddress(ipv4Address) failed: %08x\n", rc);
+ ok(rc == S_OK, "SetTransportAddress(ipv4Address) failed: %08lx\n", rc);
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, NULL);
- ok(rc == E_POINTER, "GetTransportAddress(NULL) returned unexpected result: %08x\n", rc);
+ ok(rc == E_POINTER, "GetTransportAddress(NULL) returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress));
ok(lstrcmpW(returnedAddress, ipv4Address) == 0, "Returned address != ipv4Address (%s)\n", wine_dbgstr_w(returnedAddress));
/* Try setting an IPv4 address with a port number */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, L"10.20.30.40:124");
- ok(rc == HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND), "SetTransportAddress(ipv4Address) failed: %08x\n", rc);
+ ok(rc == HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND), "SetTransportAddress(ipv4Address) failed: %08lx\n", rc);
/* Try setting an IPv6 address */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, ipv6Address);
- ok(rc == S_OK, "SetTransportAddress(ipv6Address) failed: %08x\n", rc);
+ ok(rc == S_OK, "SetTransportAddress(ipv6Address) failed: %08lx\n", rc);
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress));
ok(lstrcmpW(returnedAddress, ipv6Address) == 0, "Returned address != ipv6Address (%s)\n", wine_dbgstr_w(returnedAddress));
/* Try setting an IPv6 address with a port number */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, ipv6AddressWithPort);
- ok(rc == S_OK, "SetTransportAddress(ipv6AddressWithPort) failed: %08x\n", rc);
+ ok(rc == S_OK, "SetTransportAddress(ipv6AddressWithPort) failed: %08lx\n", rc);
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress));
todo_wine ok(lstrcmpW(returnedAddress, ipv6AddressWithPort) == 0, "Returned address != ipv6AddressWithPort (%s)\n", wine_dbgstr_w(returnedAddress));
@@ -156,37 +156,37 @@ static void GetSetPort_udp_tests(void)
int ret;
rc = WSDCreateUdpAddress(&udpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08lx\n", rc);
ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n");
/* No test for GetPort(NULL) as this causes an access violation exception on Windows */
rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort);
- ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetPort returned unexpected result: %08lx\n", rc);
ok(actualPort == 0, "GetPort returned unexpected port: %d\n", actualPort);
/* Try setting a zero port */
rc = IWSDUdpAddress_SetPort(udpAddress, 0);
- ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetPort returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort);
- ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetPort returned unexpected result: %08lx\n", rc);
ok(actualPort == 0, "GetPort returned unexpected port: %d\n", actualPort);
/* Set a real port */
rc = IWSDUdpAddress_SetPort(udpAddress, expectedPort1);
- ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetPort returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort);
- ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetPort returned unexpected result: %08lx\n", rc);
ok(actualPort == expectedPort1, "GetPort returned unexpected port: %d\n", actualPort);
/* Now set a different port */
rc = IWSDUdpAddress_SetPort(udpAddress, expectedPort2);
- ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetPort returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort);
- ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetPort returned unexpected result: %08lx\n", rc);
ok(actualPort == expectedPort2, "GetPort returned unexpected port: %d\n", actualPort);
/* Release the object */
@@ -204,30 +204,30 @@ static void GetSetMessageType_udp_tests(void)
int ret;
rc = WSDCreateUdpAddress(&udpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08lx\n", rc);
ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n");
rc = IWSDUdpAddress_GetMessageType(udpAddress, NULL);
- ok(rc == E_POINTER, "GetMessageType returned unexpected result: %08x\n", rc);
+ ok(rc == E_POINTER, "GetMessageType returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetMessageType(udpAddress, &actualMessageType);
- ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetMessageType returned unexpected result: %08lx\n", rc);
ok(actualMessageType == 0, "GetMessageType returned unexpected message type: %d\n", actualMessageType);
/* Try setting a message type */
rc = IWSDUdpAddress_SetMessageType(udpAddress, expectedMessageType1);
- ok(rc == S_OK, "SetMessageType returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetMessageType returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetMessageType(udpAddress, &actualMessageType);
- ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetMessageType returned unexpected result: %08lx\n", rc);
ok(actualMessageType == expectedMessageType1, "GetMessageType returned unexpected message type: %d\n", actualMessageType);
/* Set another one */
rc = IWSDUdpAddress_SetMessageType(udpAddress, expectedMessageType2);
- ok(rc == S_OK, "SetMessageType returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetMessageType returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetMessageType(udpAddress, &actualMessageType);
- ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetMessageType returned unexpected result: %08lx\n", rc);
ok(actualMessageType == expectedMessageType2, "GetMessageType returned unexpected message type: %d\n", actualMessageType);
/* Release the object */
@@ -265,22 +265,22 @@ static void GetSetSockaddr_udp_tests(void)
ok(ret == 0, "WSAStartup failed: %d\n", ret);
rc = WSDCreateUdpAddress(&udpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08lx\n", rc);
ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n");
rc = IWSDUdpAddress_GetSockaddr(udpAddress, NULL);
- ok(rc == E_POINTER, "GetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == E_POINTER, "GetSockaddr returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetSockaddr(udpAddress, &returnedStorage);
- ok(rc == E_FAIL, "GetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == E_FAIL, "GetSockaddr returned unexpected result: %08lx\n", rc);
/* Try setting a transport address */
rc = IWSDUdpAddress_SetTransportAddress(udpAddress, expectedIpv6TransportAddr);
- ok(rc == S_OK, "SetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "SetTransportAddress failed: %08lx\n", rc);
/* A socket address should be returned */
rc = IWSDUdpAddress_GetSockaddr(udpAddress, &returnedStorage);
- ok(rc == S_OK, "GetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetSockaddr returned unexpected result: %08lx\n", rc);
ok(returnedStorage.ss_family == AF_INET6, "returnedStorage.ss_family != AF_INET6 (%d)\n", returnedStorage.ss_family);
sockAddr6Ptr = (struct sockaddr_in6 *) &returnedStorage;
@@ -297,7 +297,7 @@ static void GetSetSockaddr_udp_tests(void)
ok(ret == 0, "IWSDUdpAddress_Release() has %d references, should have 0\n", ret);
rc = WSDCreateUdpAddress(&udpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &udpAddress) failed: %08lx\n", rc);
ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n");
/* Try setting an IPv4 address */
@@ -309,34 +309,34 @@ static void GetSetSockaddr_udp_tests(void)
ok(ret == 1, "inet_pton(ipv4) failed: %d\n", WSAGetLastError());
rc = IWSDUdpAddress_SetSockaddr(udpAddress, &storage1);
- ok(rc == S_OK, "SetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetSockaddr returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetSockaddr(udpAddress, &returnedStorage);
- ok(rc == S_OK, "GetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetSockaddr returned unexpected result: %08lx\n", rc);
ok(returnedStorage.ss_family == storage1.ss_family, "returnedStorage.ss_family != storage1.ss_family (%d)\n", returnedStorage.ss_family);
ok(memcmp(&returnedStorage, &storage1, sizeof(struct sockaddr_in)) == 0, "returnedStorage != storage1\n");
/* Check that GetTransportAddress returns the address set via the socket */
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress failed: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress);
ok(lstrcmpW(returnedAddress, L"1.2.3.4:1234") == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress));
/* Check that GetPort doesn't return the port set via the socket */
rc = IWSDUdpAddress_GetPort(udpAddress, &port);
- ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetPort returned unexpected result: %08lx\n", rc);
ok(port == 0, "GetPort returned unexpected port: %d\n", port);
/* Try setting an IPv4 address without a port */
sockAddrPtr->sin_port = 0;
rc = IWSDUdpAddress_SetSockaddr(udpAddress, &storage1);
- ok(rc == S_OK, "SetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetSockaddr returned unexpected result: %08lx\n", rc);
/* Check that GetTransportAddress returns the address set via the socket */
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress failed: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress);
ok(lstrcmpW(returnedAddress, L"1.2.3.4") == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress));
@@ -349,39 +349,39 @@ static void GetSetSockaddr_udp_tests(void)
ok(ret == 1, "inet_pton(ipv6) failed: %d\n", WSAGetLastError());
rc = IWSDUdpAddress_SetSockaddr(udpAddress, &storage2);
- ok(rc == S_OK, "SetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetSockaddr returned unexpected result: %08lx\n", rc);
rc = IWSDUdpAddress_GetSockaddr(udpAddress, &returnedStorage);
- ok(rc == S_OK, "GetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetSockaddr returned unexpected result: %08lx\n", rc);
ok(returnedStorage.ss_family == storage2.ss_family, "returnedStorage.ss_family != storage2.ss_family (%d)\n", returnedStorage.ss_family);
ok(memcmp(&returnedStorage, &storage2, sizeof(struct sockaddr_in6)) == 0, "returnedStorage != storage2\n");
/* Check that GetTransportAddress returns the address set via the socket */
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress failed: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress);
ok(lstrcmpW(returnedAddress, expectedIpv6TransportAddr) == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress));
/* Check that GetPort doesn't return the port set via the socket */
rc = IWSDUdpAddress_GetPort(udpAddress, &port);
- ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "GetPort returned unexpected result: %08lx\n", rc);
ok(port == 0, "GetPort returned unexpected port: %d\n", port);
/* Try setting an IPv6 address without a port */
sockAddr6Ptr->sin6_port = 0;
rc = IWSDUdpAddress_SetSockaddr(udpAddress, &storage2);
- ok(rc == S_OK, "SetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetSockaddr returned unexpected result: %08lx\n", rc);
/* Check that GetTransportAddress returns the address set via the socket */
rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress);
- ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "GetTransportAddress failed: %08lx\n", rc);
ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress);
ok(lstrcmpW(returnedAddress, L"2a00:1234:5678:dead:beef::aaaa") == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress));
rc = IWSDUdpAddress_SetSockaddr(udpAddress, &storage2);
- ok(rc == S_OK, "SetSockaddr returned unexpected result: %08x\n", rc);
+ ok(rc == S_OK, "SetSockaddr returned unexpected result: %08lx\n", rc);
/* Release the object */
ret = IWSDUdpAddress_Release(udpAddress);
diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c
index 2ecb3d2ccd8..01b28a3c1ad 100644
--- a/dlls/wsdapi/tests/discovery.c
+++ b/dlls/wsdapi/tests/discovery.c
@@ -482,7 +482,7 @@ static ULONG WINAPI IWSDiscoveryPublisherNotifyImpl_AddRef(IWSDiscoveryPublisher
IWSDiscoveryPublisherNotifyImpl *This = impl_from_IWSDiscoveryPublisherNotify(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- trace("IWSDiscoveryPublisherNotifyImpl_AddRef called (%p, ref = %d)\n", This, ref);
+ trace("IWSDiscoveryPublisherNotifyImpl_AddRef called (%p, ref = %ld)\n", This, ref);
return ref;
}
@@ -491,7 +491,7 @@ static ULONG WINAPI IWSDiscoveryPublisherNotifyImpl_Release(IWSDiscoveryPublishe
IWSDiscoveryPublisherNotifyImpl *This = impl_from_IWSDiscoveryPublisherNotify(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- trace("IWSDiscoveryPublisherNotifyImpl_Release called (%p, ref = %d)\n", This, ref);
+ trace("IWSDiscoveryPublisherNotifyImpl_Release called (%p, ref = %ld)\n", This, ref);
if (ref == 0)
{
@@ -621,7 +621,7 @@ static HRESULT WINAPI IWSDiscoveryPublisherNotifyImpl_ProbeHandler(IWSDiscoveryP
verify_wsdxml_any_text("probe_msg->Any", probe_msg->Any, uri_more_tests_no_slash, prefix_grog, L"Lager", L"MoreInfo");
rc = IWSDMessageParameters_GetRemoteAddress(pMessageParameters, (IWSDAddress **) &remote_addr);
- ok(rc == S_OK, "IWSDMessageParameters_GetRemoteAddress returned %08x\n", rc);
+ ok(rc == S_OK, "IWSDMessageParameters_GetRemoteAddress returned %08lx\n", rc);
if (remote_addr != NULL)
{
@@ -640,7 +640,7 @@ static HRESULT WINAPI IWSDiscoveryPublisherNotifyImpl_ProbeHandler(IWSDiscoveryP
int i;
rc = IWSDUdpAddress_GetSockaddr(remote_addr, &remote_sock);
- ok(rc == S_OK, "IWSDMessageParameters_GetRemoteAddress returned %08x\n", rc);
+ ok(rc == S_OK, "IWSDMessageParameters_GetRemoteAddress returned %08lx\n", rc);
IWSDUdpAddress_Release(remote_addr);
@@ -664,21 +664,21 @@ static HRESULT WINAPI IWSDiscoveryPublisherNotifyImpl_ProbeHandler(IWSDiscoveryP
header_any_name.Space = &ns;
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"PublishTest", &header_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"BodyTest", &body_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"EndPTest", &endpoint_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"RefPTest", &ref_param_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = IWSDiscoveryPublisher_MatchProbeEx(publisher_instance, pSoap, pMessageParameters, publisherIdW, 1, 1, 1,
sequenceIdW, probe_msg->Types, NULL, NULL, header_any_element, ref_param_any_element, NULL,
endpoint_any_element, body_any_element);
- ok(rc == S_OK, "IWSDiscoveryPublisher_MatchProbeEx failed with %08x\n", rc);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_MatchProbeEx failed with %08lx\n", rc);
WSDFreeLinkedMemory(header_any_element);
WSDFreeLinkedMemory(body_any_element);
@@ -808,27 +808,27 @@ static void CreateDiscoveryPublisher_tests(void)
ULONG ref;
rc = WSDCreateDiscoveryPublisher(NULL, NULL);
- ok((rc == E_POINTER) || (rc == E_INVALIDARG), "WSDCreateDiscoveryPublisher(NULL, NULL) failed: %08x\n", rc);
+ ok((rc == E_POINTER) || (rc == E_INVALIDARG), "WSDCreateDiscoveryPublisher(NULL, NULL) failed: %08lx\n", rc);
rc = WSDCreateDiscoveryPublisher(NULL, &publisher);
- ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08lx\n", rc);
ok(publisher != NULL, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: publisher == NULL\n");
/* Try to query for objects */
rc = IWSDiscoveryPublisher_QueryInterface(publisher, &IID_IUnknown, (LPVOID*)&unknown);
- ok(rc == S_OK,"IWSDiscoveryPublisher_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
+ ok(rc == S_OK,"IWSDiscoveryPublisher_QueryInterface(IID_IUnknown) failed: %08lx\n", rc);
if (rc == S_OK)
IUnknown_Release(unknown);
rc = IWSDiscoveryPublisher_QueryInterface(publisher, &IID_IWSDiscoveryPublisher, (LPVOID*)&publisher2);
- ok(rc == S_OK,"IWSDiscoveryPublisher_QueryInterface(IID_IWSDiscoveryPublisher) failed: %08x\n", rc);
+ ok(rc == S_OK,"IWSDiscoveryPublisher_QueryInterface(IID_IWSDiscoveryPublisher) failed: %08lx\n", rc);
if (rc == S_OK)
IWSDiscoveryPublisher_Release(publisher2);
ref = IWSDiscoveryPublisher_Release(publisher);
- ok(ref == 0, "IWSDiscoveryPublisher_Release() has %d references, should have 0\n", ref);
+ ok(ref == 0, "IWSDiscoveryPublisher_Release() has %ld references, should have 0\n", ref);
}
static void CreateDiscoveryPublisher_XMLContext_tests(void)
@@ -840,17 +840,17 @@ static void CreateDiscoveryPublisher_XMLContext_tests(void)
/* Test creating an XML context and supplying it to WSDCreateDiscoveryPublisher */
rc = WSDXMLCreateContext(&xmlContext);
- ok(rc == S_OK, "WSDXMLCreateContext failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLCreateContext failed: %08lx\n", rc);
rc = WSDCreateDiscoveryPublisher(xmlContext, &publisher);
- ok(rc == S_OK, "WSDCreateDiscoveryPublisher(xmlContext, &publisher) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateDiscoveryPublisher(xmlContext, &publisher) failed: %08lx\n", rc);
ok(publisher != NULL, "WSDCreateDiscoveryPublisher(xmlContext, &publisher) failed: publisher == NULL\n");
rc = IWSDiscoveryPublisher_GetXMLContext(publisher, NULL);
- ok(rc == E_INVALIDARG, "GetXMLContext returned unexpected value with NULL argument: %08x\n", rc);
+ ok(rc == E_INVALIDARG, "GetXMLContext returned unexpected value with NULL argument: %08lx\n", rc);
rc = IWSDiscoveryPublisher_GetXMLContext(publisher, &returnedContext);
- ok(rc == S_OK, "GetXMLContext failed: %08x\n", rc);
+ ok(rc == S_OK, "GetXMLContext failed: %08lx\n", rc);
ok(xmlContext == returnedContext, "GetXMLContext returned unexpected value: returnedContext == %p\n", returnedContext);
@@ -868,11 +868,11 @@ static void CreateDiscoveryPublisher_XMLContext_tests(void)
returnedContext = NULL;
rc = WSDCreateDiscoveryPublisher(NULL, &publisher);
- ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08lx\n", rc);
ok(publisher != NULL, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: publisher == NULL\n");
rc = IWSDiscoveryPublisher_GetXMLContext(publisher, &returnedContext);
- ok(rc == S_OK, "GetXMLContext failed: %08x\n", rc);
+ ok(rc == S_OK, "GetXMLContext failed: %08lx\n", rc);
ref = IWSDXMLContext_Release(returnedContext);
ok(ref == 1, "IWSDXMLContext_Release() has %d references, should have 1\n", ref);
@@ -907,21 +907,21 @@ static void Publish_tests(void)
unsigned char *probe_uuid_str;
rc = WSDCreateDiscoveryPublisher(NULL, &publisher);
- ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08lx\n", rc);
ok(publisher != NULL, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: publisher == NULL\n");
publisher_instance = publisher;
/* Test SetAddressFamily */
rc = IWSDiscoveryPublisher_SetAddressFamily(publisher, 12345);
- ok(rc == E_INVALIDARG, "IWSDiscoveryPublisher_SetAddressFamily(12345) returned unexpected result: %08x\n", rc);
+ ok(rc == E_INVALIDARG, "IWSDiscoveryPublisher_SetAddressFamily(12345) returned unexpected result: %08lx\n", rc);
rc = IWSDiscoveryPublisher_SetAddressFamily(publisher, WSDAPI_ADDRESSFAMILY_IPV4);
- ok(rc == S_OK, "IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV4) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV4) failed: %08lx\n", rc);
/* Try to update the address family after already setting it */
rc = IWSDiscoveryPublisher_SetAddressFamily(publisher, WSDAPI_ADDRESSFAMILY_IPV6);
- ok(rc == STG_E_INVALIDFUNCTION, "IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV6) returned unexpected result: %08x\n", rc);
+ ok(rc == STG_E_INVALIDFUNCTION, "IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV6) returned unexpected result: %08lx\n", rc);
/* Create notification sinks */
ok(create_discovery_publisher_notify(&sink1) == TRUE, "create_discovery_publisher_notify failed\n");
@@ -933,21 +933,21 @@ static void Publish_tests(void)
/* Attempt to unregister sink before registering it */
rc = IWSDiscoveryPublisher_UnRegisterNotificationSink(publisher, sink1);
- ok(rc == E_FAIL, "IWSDiscoveryPublisher_UnRegisterNotificationSink returned unexpected result: %08x\n", rc);
+ ok(rc == E_FAIL, "IWSDiscoveryPublisher_UnRegisterNotificationSink returned unexpected result: %08lx\n", rc);
/* Register notification sinks */
rc = IWSDiscoveryPublisher_RegisterNotificationSink(publisher, sink1);
- ok(rc == S_OK, "IWSDiscoveryPublisher_RegisterNotificationSink failed: %08x\n", rc);
- ok(sink1Impl->ref == 2, "Ref count for sink 1 is not as expected: %d\n", sink1Impl->ref);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_RegisterNotificationSink failed: %08lx\n", rc);
+ ok(sink1Impl->ref == 2, "Ref count for sink 1 is not as expected: %ld\n", sink1Impl->ref);
rc = IWSDiscoveryPublisher_RegisterNotificationSink(publisher, sink2);
- ok(rc == S_OK, "IWSDiscoveryPublisher_RegisterNotificationSink failed: %08x\n", rc);
- ok(sink2Impl->ref == 2, "Ref count for sink 2 is not as expected: %d\n", sink2Impl->ref);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_RegisterNotificationSink failed: %08lx\n", rc);
+ ok(sink2Impl->ref == 2, "Ref count for sink 2 is not as expected: %ld\n", sink2Impl->ref);
/* Unregister the first sink */
rc = IWSDiscoveryPublisher_UnRegisterNotificationSink(publisher, sink1);
- ok(rc == S_OK, "IWSDiscoveryPublisher_UnRegisterNotificationSink failed: %08x\n", rc);
- ok(sink1Impl->ref == 1, "Ref count for sink 1 is not as expected: %d\n", sink1Impl->ref);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_UnRegisterNotificationSink failed: %08lx\n", rc);
+ ok(sink1Impl->ref == 1, "Ref count for sink 1 is not as expected: %ld\n", sink1Impl->ref);
/* Set up network listener */
publisherIdW = utf8_to_wide(publisherId);
@@ -976,16 +976,16 @@ static void Publish_tests(void)
header_any_name.Space = &ns;
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"PublishTest", &header_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"BodyTest", &body_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"EndPTest", &endpoint_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, L"RefPTest", &ref_param_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
/* Create types list */
ns2.Uri = uri_more_tests;
@@ -1025,7 +1025,7 @@ static void Publish_tests(void)
heap_free(scopes_list.Next);
heap_free(xaddrs_list.Next);
- ok(rc == S_OK, "Publish failed: %08x\n", rc);
+ ok(rc == S_OK, "Publish failed: %08lx\n", rc);
/* Wait up to 2 seconds for messages to be received */
if (WaitForMultipleObjects(msgStorage->numThreadHandles, msgStorage->threadHandles, TRUE, 2000) == WAIT_TIMEOUT)
@@ -1122,11 +1122,11 @@ after_publish_test:
CloseHandle(probe_event);
ref = IWSDiscoveryPublisher_Release(publisher);
- ok(ref == 0, "IWSDiscoveryPublisher_Release() has %d references, should have 0\n", ref);
+ ok(ref == 0, "IWSDiscoveryPublisher_Release() has %ld references, should have 0\n", ref);
/* Check that the sinks have been released by the publisher */
- ok(sink1Impl->ref == 1, "Ref count for sink 1 is not as expected: %d\n", sink1Impl->ref);
- ok(sink2Impl->ref == 1, "Ref count for sink 2 is not as expected: %d\n", sink2Impl->ref);
+ ok(sink1Impl->ref == 1, "Ref count for sink 1 is not as expected: %ld\n", sink1Impl->ref);
+ ok(sink2Impl->ref == 1, "Ref count for sink 2 is not as expected: %ld\n", sink2Impl->ref);
/* Release the sinks */
IWSDiscoveryPublisherNotify_Release(sink1);
@@ -1154,16 +1154,16 @@ static void UnPublish_tests(void)
WSDXML_NAMESPACE ns;
rc = WSDCreateDiscoveryPublisher(NULL, &publisher);
- ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08lx\n", rc);
ok(publisher != NULL, "WSDCreateDiscoveryPublisher(NULL, &publisher) failed: publisher == NULL\n");
rc = IWSDiscoveryPublisher_SetAddressFamily(publisher, WSDAPI_ADDRESSFAMILY_IPV4);
- ok(rc == S_OK, "IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV4) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV4) failed: %08lx\n", rc);
/* Create notification sink */
ok(create_discovery_publisher_notify(&sink1) == TRUE, "create_discovery_publisher_notify failed\n");
rc = IWSDiscoveryPublisher_RegisterNotificationSink(publisher, sink1);
- ok(rc == S_OK, "IWSDiscoveryPublisher_RegisterNotificationSink failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDiscoveryPublisher_RegisterNotificationSink failed: %08lx\n", rc);
/* Set up network listener */
publisherIdW = utf8_to_wide(publisherId);
@@ -1192,14 +1192,14 @@ static void UnPublish_tests(void)
body_any_name.Space = &ns;
rc = WSDXMLBuildAnyForSingleElement(&body_any_name, L"BodyTest", &body_any_element);
- ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+ ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08lx\n", rc);
/* Unpublish the service */
rc = IWSDiscoveryPublisher_UnPublish(publisher, publisherIdW, 1, 1, sequenceIdW, body_any_element);
WSDFreeLinkedMemory(body_any_element);
- ok(rc == S_OK, "Unpublish failed: %08x\n", rc);
+ ok(rc == S_OK, "Unpublish failed: %08lx\n", rc);
/* Wait up to 2 seconds for messages to be received */
if (WaitForMultipleObjects(msg_storage->numThreadHandles, msg_storage->threadHandles, TRUE, 2000) == WAIT_TIMEOUT)
@@ -1260,7 +1260,7 @@ after_unpublish_test:
heap_free(sequenceIdW);
ref = IWSDiscoveryPublisher_Release(publisher);
- ok(ref == 0, "IWSDiscoveryPublisher_Release() has %d references, should have 0\n", ref);
+ ok(ref == 0, "IWSDiscoveryPublisher_Release() has %ld references, should have 0\n", ref);
/* Release the sinks */
IWSDiscoveryPublisherNotify_Release(sink1);
@@ -1302,18 +1302,18 @@ static BOOL is_firewall_enabled(void)
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
(void **)&mgr );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
if (hr != S_OK) goto done;
hr = INetFwProfile_get_FirewallEnabled( profile, &enabled );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
done:
if (policy) INetFwPolicy_Release( policy );
@@ -1342,23 +1342,23 @@ static HRESULT set_firewall( enum firewall_op op )
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
(void **)&mgr );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
if (hr != S_OK) goto done;
hr = INetFwProfile_get_AuthorizedApplications( profile, &apps );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER,
&IID_INetFwAuthorizedApplication, (void **)&app );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
@@ -1367,7 +1367,7 @@ static HRESULT set_firewall( enum firewall_op op )
name = SysAllocString( L"wsdapi_test" );
hr = INetFwAuthorizedApplication_put_Name( app, name );
SysFreeString( name );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %08lx\n", hr );
if (hr != S_OK) goto done;
if (op == APP_ADD)
@@ -1402,7 +1402,7 @@ START_TEST(discovery)
}
if ((hr = set_firewall(APP_ADD)) != S_OK)
{
- skip("can't authorize app in firewall %08x\n", hr);
+ skip("can't authorize app in firewall %08lx\n", hr);
return;
}
}
diff --git a/dlls/wsdapi/tests/msgparams.c b/dlls/wsdapi/tests/msgparams.c
index 6e40094f171..116b3c94d78 100644
--- a/dlls/wsdapi/tests/msgparams.c
+++ b/dlls/wsdapi/tests/msgparams.c
@@ -37,33 +37,33 @@ static void CreateUdpMessageParameters_tests(void)
ULONG ref;
rc = WSDCreateUdpMessageParameters(NULL);
- ok((rc == E_POINTER) || (rc == E_INVALIDARG), "WSDCreateUdpMessageParameters(NULL) failed: %08x\n", rc);
+ ok((rc == E_POINTER) || (rc == E_INVALIDARG), "WSDCreateUdpMessageParameters(NULL) failed: %08lx\n", rc);
rc = WSDCreateUdpMessageParameters(&udpMessageParams);
- ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08lx\n", rc);
ok(udpMessageParams != NULL, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL\n");
/* Try to query for objects */
rc = IWSDUdpMessageParameters_QueryInterface(udpMessageParams, &IID_IWSDUdpMessageParameters, (LPVOID*)&udpMessageParams2);
- ok(rc == S_OK, "IWSDUdpMessageParams_QueryInterface(IID_IWSDUdpMessageParameters) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpMessageParams_QueryInterface(IID_IWSDUdpMessageParameters) failed: %08lx\n", rc);
if (rc == S_OK)
IWSDUdpMessageParameters_Release(udpMessageParams2);
rc = IWSDUdpMessageParameters_QueryInterface(udpMessageParams, &IID_IWSDMessageParameters, (LPVOID*)&messageParams);
- ok(rc == S_OK, "IWSDUdpMessageParams_QueryInterface(IID_WSDMessageParameters) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpMessageParams_QueryInterface(IID_WSDMessageParameters) failed: %08lx\n", rc);
if (rc == S_OK)
IWSDMessageParameters_Release(messageParams);
rc = IWSDUdpMessageParameters_QueryInterface(udpMessageParams, &IID_IUnknown, (LPVOID*)&unknown);
- ok(rc == S_OK, "IWSDUdpMessageParams_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
+ ok(rc == S_OK, "IWSDUdpMessageParams_QueryInterface(IID_IUnknown) failed: %08lx\n", rc);
if (rc == S_OK)
IUnknown_Release(unknown);
ref = IWSDUdpMessageParameters_Release(udpMessageParams);
- ok(ref == 0, "IWSDUdpMessageParameters_Release() has %d references, should have 0\n", ref);
+ ok(ref == 0, "IWSDUdpMessageParameters_Release() has %ld references, should have 0\n", ref);
}
static void LocalAddress_tests(void)
@@ -79,29 +79,29 @@ static void LocalAddress_tests(void)
ok(ret == 0, "WSAStartup failed: %d\n", ret);
rc = WSDCreateUdpMessageParameters(&udpMessageParams);
- ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08lx\n", rc);
ok(udpMessageParams != NULL, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL\n");
rc = IWSDUdpMessageParameters_GetLocalAddress(udpMessageParams, NULL);
- ok(rc == E_POINTER, "GetLocalAddress failed: %08x\n", rc);
+ ok(rc == E_POINTER, "GetLocalAddress failed: %08lx\n", rc);
ok(returnedAddress == NULL, "GetLocalAddress returned %p\n", returnedAddress);
rc = IWSDUdpMessageParameters_GetLocalAddress(udpMessageParams, &returnedAddress);
- ok(rc == E_ABORT, "GetLocalAddress failed: %08x\n", rc);
+ ok(rc == E_ABORT, "GetLocalAddress failed: %08lx\n", rc);
ok(returnedAddress == NULL, "GetLocalAddress returned %p\n", returnedAddress);
rc = WSDCreateUdpAddress(&origUdpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &origUdpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &origUdpAddress) failed: %08lx\n", rc);
ok(origUdpAddress != NULL, "WSDCreateUdpMessageParameters(NULL, &origUdpAddress) failed: origUdpAddress == NULL\n");
rc = IWSDUdpAddress_SetTransportAddress(origUdpAddress, L"1.2.3.4");
- ok(rc == S_OK, "SetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "SetTransportAddress failed: %08lx\n", rc);
rc = IWSDUdpMessageParameters_SetLocalAddress(udpMessageParams, (IWSDAddress *)origUdpAddress);
- ok(rc == S_OK, "SetLocalAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "SetLocalAddress failed: %08lx\n", rc);
rc = IWSDUdpMessageParameters_GetLocalAddress(udpMessageParams, &returnedAddress);
- ok(rc == S_OK, "GetLocalAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "GetLocalAddress failed: %08lx\n", rc);
ok(returnedAddress != NULL, "GetLocalAddress returned NULL\n");
/* Check if GetLocalAddress returns the same object */
@@ -136,29 +136,29 @@ static void RemoteAddress_tests(void)
ok(ret == 0, "WSAStartup failed: %d\n", ret);
rc = WSDCreateUdpMessageParameters(&udpMessageParams);
- ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08lx\n", rc);
ok(udpMessageParams != NULL, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL\n");
rc = IWSDUdpMessageParameters_GetRemoteAddress(udpMessageParams, NULL);
- ok(rc == E_POINTER, "GetRemoteAddress failed: %08x\n", rc);
+ ok(rc == E_POINTER, "GetRemoteAddress failed: %08lx\n", rc);
ok(returnedAddress == NULL, "GetRemoteAddress returned %p\n", returnedAddress);
rc = IWSDUdpMessageParameters_GetRemoteAddress(udpMessageParams, &returnedAddress);
- ok(rc == E_ABORT, "GetRemoteAddress failed: %08x\n", rc);
+ ok(rc == E_ABORT, "GetRemoteAddress failed: %08lx\n", rc);
ok(returnedAddress == NULL, "GetRemoteAddress returned %p\n", returnedAddress);
rc = WSDCreateUdpAddress(&origUdpAddress);
- ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &origUdpAddress) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpAddress(NULL, &origUdpAddress) failed: %08lx\n", rc);
ok(origUdpAddress != NULL, "WSDCreateUdpMessageParameters(NULL, &origUdpAddress) failed: origUdpAddress == NULL\n");
rc = IWSDUdpAddress_SetTransportAddress(origUdpAddress, L"1.2.3.4");
- ok(rc == S_OK, "SetTransportAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "SetTransportAddress failed: %08lx\n", rc);
rc = IWSDUdpMessageParameters_SetRemoteAddress(udpMessageParams, (IWSDAddress *)origUdpAddress);
- ok(rc == S_OK, "SetRemoteAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "SetRemoteAddress failed: %08lx\n", rc);
rc = IWSDUdpMessageParameters_GetRemoteAddress(udpMessageParams, &returnedAddress);
- ok(rc == S_OK, "GetRemoteAddress failed: %08x\n", rc);
+ ok(rc == S_OK, "GetRemoteAddress failed: %08lx\n", rc);
ok(returnedAddress != NULL, "GetLocalAddress returned NULL\n");
/* Check if GetRemoteAddress returns the same object */
@@ -191,21 +191,21 @@ static void RetransmitParams_tests(void)
ZeroMemory(&returnedParams, sizeof(WSDUdpRetransmitParams));
rc = WSDCreateUdpMessageParameters(&udpMessageParams);
- ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08x\n", rc);
+ ok(rc == S_OK, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08lx\n", rc);
ok(udpMessageParams != NULL, "WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL\n");
rc = IWSDUdpMessageParameters_GetRetransmitParams(udpMessageParams, NULL);
- ok(rc == E_POINTER, "GetRetransmitParams returned unexpected result: %08x\n", rc);
+ ok(rc == E_POINTER, "GetRetransmitParams returned unexpected result: %08lx\n", rc);
/* Check if the default values are returned */
rc = IWSDUdpMessageParameters_GetRetransmitParams(udpMessageParams, &returnedParams);
- ok(rc == S_OK, "GetRetransmitParams failed: %08x\n", rc);
+ ok(rc == S_OK, "GetRetransmitParams failed: %08lx\n", rc);
- ok(returnedParams.ulSendDelay == 0, "ulSendDelay = %d\n", returnedParams.ulSendDelay);
- ok(returnedParams.ulRepeat == 1, "ulRepeat = %d\n", returnedParams.ulRepeat);
- ok(returnedParams.ulRepeatMinDelay == 50, "ulRepeatMinDelay = %d\n", returnedParams.ulRepeatMinDelay);
- ok(returnedParams.ulRepeatMaxDelay == 250, "ulRepeatMaxDelay = %d\n", returnedParams.ulRepeatMaxDelay);
- ok(returnedParams.ulRepeatUpperDelay == 450, "ulRepeatUpperDelay = %d\n", returnedParams.ulRepeatUpperDelay);
+ ok(returnedParams.ulSendDelay == 0, "ulSendDelay = %ld\n", returnedParams.ulSendDelay);
+ ok(returnedParams.ulRepeat == 1, "ulRepeat = %ld\n", returnedParams.ulRepeat);
+ ok(returnedParams.ulRepeatMinDelay == 50, "ulRepeatMinDelay = %ld\n", returnedParams.ulRepeatMinDelay);
+ ok(returnedParams.ulRepeatMaxDelay == 250, "ulRepeatMaxDelay = %ld\n", returnedParams.ulRepeatMaxDelay);
+ ok(returnedParams.ulRepeatUpperDelay == 450, "ulRepeatUpperDelay = %ld\n", returnedParams.ulRepeatUpperDelay);
/* Now try setting some custom parameters */
origParams.ulSendDelay = 100;
@@ -215,22 +215,22 @@ static void RetransmitParams_tests(void)
origParams.ulRepeatUpperDelay = 500;
rc = IWSDUdpMessageParameters_SetRetransmitParams(udpMessageParams, &origParams);
- ok(rc == S_OK, "SetRetransmitParams failed: %08x\n", rc);
+ ok(rc == S_OK, "SetRetransmitParams failed: %08lx\n", rc);
ZeroMemory(&returnedParams, sizeof(WSDUdpRetransmitParams));
rc = IWSDUdpMessageParameters_GetRetransmitParams(udpMessageParams, &returnedParams);
- ok(rc == S_OK, "GetRetransmitParams failed: %08x\n", rc);
+ ok(rc == S_OK, "GetRetransmitParams failed: %08lx\n", rc);
- ok(origParams.ulSendDelay == returnedParams.ulSendDelay, "ulSendDelay = %d\n", returnedParams.ulSendDelay);
- ok(origParams.ulRepeat == returnedParams.ulRepeat, "ulRepeat = %d\n", returnedParams.ulRepeat);
- ok(origParams.ulRepeatMinDelay == returnedParams.ulRepeatMinDelay, "ulRepeatMinDelay = %d\n", returnedParams.ulRepeatMinDelay);
- ok(origParams.ulRepeatMaxDelay == returnedParams.ulRepeatMaxDelay, "ulRepeatMaxDelay = %d\n", returnedParams.ulRepeatMaxDelay);
- ok(origParams.ulRepeatUpperDelay == returnedParams.ulRepeatUpperDelay, "ulRepeatUpperDelay = %d\n", returnedParams.ulRepeatUpperDelay);
+ ok(origParams.ulSendDelay == returnedParams.ulSendDelay, "ulSendDelay = %ld\n", returnedParams.ulSendDelay);
+ ok(origParams.ulRepeat == returnedParams.ulRepeat, "ulRepeat = %ld\n", returnedParams.ulRepeat);
+ ok(origParams.ulRepeatMinDelay == returnedParams.ulRepeatMinDelay, "ulRepeatMinDelay = %ld\n", returnedParams.ulRepeatMinDelay);
+ ok(origParams.ulRepeatMaxDelay == returnedParams.ulRepeatMaxDelay, "ulRepeatMaxDelay = %ld\n", returnedParams.ulRepeatMaxDelay);
+ ok(origParams.ulRepeatUpperDelay == returnedParams.ulRepeatUpperDelay, "ulRepeatUpperDelay = %ld\n", returnedParams.ulRepeatUpperDelay);
/* Try setting a null parameter */
rc = IWSDUdpMessageParameters_SetRetransmitParams(udpMessageParams, NULL);
- ok(rc == E_INVALIDARG, "SetRetransmitParams returned unexpected result: %08x\n", rc);
+ ok(rc == E_INVALIDARG, "SetRetransmitParams returned unexpected result: %08lx\n", rc);
/* Now attempt to set some invalid parameters - these appear to be accepted */
origParams.ulSendDelay = INFINITE;
@@ -240,18 +240,18 @@ static void RetransmitParams_tests(void)
origParams.ulRepeatUpperDelay = 100;
rc = IWSDUdpMessageParameters_SetRetransmitParams(udpMessageParams, &origParams);
- ok(rc == S_OK, "SetRetransmitParams failed: %08x\n", rc);
+ ok(rc == S_OK, "SetRetransmitParams failed: %08lx\n", rc);
ZeroMemory(&returnedParams, sizeof(WSDUdpRetransmitParams));
rc = IWSDUdpMessageParameters_GetRetransmitParams(udpMessageParams, &returnedParams);
- ok(rc == S_OK, "GetRetransmitParams failed: %08x\n", rc);
+ ok(rc == S_OK, "GetRetransmitParams failed: %08lx\n", rc);
- ok(origParams.ulSendDelay == returnedParams.ulSendDelay, "ulSendDelay = %d\n", returnedParams.ulSendDelay);
- ok(origParams.ulRepeat == returnedParams.ulRepeat, "ulRepeat = %d\n", returnedParams.ulRepeat);
- ok(origParams.ulRepeatMinDelay == returnedParams.ulRepeatMinDelay, "ulRepeatMinDelay = %d\n", returnedParams.ulRepeatMinDelay);
- ok(origParams.ulRepeatMaxDelay == returnedParams.ulRepeatMaxDelay, "ulRepeatMaxDelay = %d\n", returnedParams.ulRepeatMaxDelay);
- ok(origParams.ulRepeatUpperDelay == returnedParams.ulRepeatUpperDelay, "ulRepeatUpperDelay = %d\n", returnedParams.ulRepeatUpperDelay);
+ ok(origParams.ulSendDelay == returnedParams.ulSendDelay, "ulSendDelay = %ld\n", returnedParams.ulSendDelay);
+ ok(origParams.ulRepeat == returnedParams.ulRepeat, "ulRepeat = %ld\n", returnedParams.ulRepeat);
+ ok(origParams.ulRepeatMinDelay == returnedParams.ulRepeatMinDelay, "ulRepeatMinDelay = %ld\n", returnedParams.ulRepeatMinDelay);
+ ok(origParams.ulRepeatMaxDelay == returnedParams.ulRepeatMaxDelay, "ulRepeatMaxDelay = %ld\n", returnedParams.ulRepeatMaxDelay);
+ ok(origParams.ulRepeatUpperDelay == returnedParams.ulRepeatUpperDelay, "ulRepeatUpperDelay = %ld\n", returnedParams.ulRepeatUpperDelay);
ret = IWSDUdpMessageParameters_Release(udpMessageParams);
ok(ret == 0, "IWSDUdpMessageParameters_Release() has %d references, should have 0\n", ret);
diff --git a/dlls/wsdapi/tests/xml.c b/dlls/wsdapi/tests/xml.c
index ad0d5d11068..0b56024c667 100644
--- a/dlls/wsdapi/tests/xml.c
+++ b/dlls/wsdapi/tests/xml.c
@@ -46,19 +46,19 @@ static void BuildAnyForSingleElement_tests(void)
/* Test invalid arguments */
hr = WSDXMLBuildAnyForSingleElement(NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&name, NULL, NULL);
- ok(hr == E_POINTER, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == E_POINTER, "BuildAnyForSingleElement failed with %08lx\n", hr);
/* Test calling the function with a text size that exceeds 8192 characters */
hr = WSDXMLBuildAnyForSingleElement(&name, largeText, &element);
- ok(hr == E_INVALIDARG, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "BuildAnyForSingleElement failed with %08lx\n", hr);
/* Test with valid parameters but no text */
hr = WSDXMLBuildAnyForSingleElement(&name, NULL, &element);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
ok(element->Name != &name, "element->Name has not been duplicated\n");
ok(element->Name->Space != name.Space, "element->Name->Space has not been duplicated\n");
@@ -74,7 +74,7 @@ static void BuildAnyForSingleElement_tests(void)
/* Test with valid parameters and text */
hr = WSDXMLBuildAnyForSingleElement(&name, text, &element);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
ok(element->Name != &name, "element->Name has not been duplicated\n");
ok(element->Name->Space != name.Space, "element->Name->Space has not been duplicated\n");
@@ -108,7 +108,7 @@ static void AddChild_tests(void)
/* Test invalid values */
hr = WSDXMLAddChild(NULL, NULL);
- ok(hr == E_INVALIDARG, "WSDXMLAddChild failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "WSDXMLAddChild failed with %08lx\n", hr);
/* Populate structures */
ns.Uri = L"http://test.test/";
@@ -125,13 +125,13 @@ static void AddChild_tests(void)
/* Create some elements */
hr = WSDXMLBuildAnyForSingleElement(&parentName, NULL, &parent);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child1Name, child1NameText, &child1);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child2Name, NULL, &child2);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
ok(parent->Node.Parent == NULL, "parent->Node.Parent == %p\n", parent->Node.Parent);
ok(parent->FirstChild == NULL, "parent->FirstChild == %p\n", parent->FirstChild);
@@ -143,7 +143,7 @@ static void AddChild_tests(void)
/* Add the child to the parent */
hr = WSDXMLAddChild(parent, child1);
- ok(hr == S_OK, "WSDXMLAddChild failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLAddChild failed with %08lx\n", hr);
ok(parent->Node.Parent == NULL, "parent->Node.Parent == %p\n", parent->Node.Parent);
ok(parent->FirstChild == (WSDXML_NODE *)child1, "parent->FirstChild == %p\n", parent->FirstChild);
@@ -155,15 +155,15 @@ static void AddChild_tests(void)
/* Try to set child1 as the child of child2, which already has a parent */
hr = WSDXMLAddChild(child2, child1);
- ok(hr == E_INVALIDARG, "WSDXMLAddChild failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "WSDXMLAddChild failed with %08lx\n", hr);
/* Try to set child2 as the child of child1, which has a text node as a child */
hr = WSDXMLAddChild(child2, child1);
- ok(hr == E_INVALIDARG, "WSDXMLAddChild failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "WSDXMLAddChild failed with %08lx\n", hr);
/* Add child2 as a child of parent */
hr = WSDXMLAddChild(parent, child2);
- ok(hr == S_OK, "WSDXMLAddChild failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLAddChild failed with %08lx\n", hr);
ok(parent->Node.Parent == NULL, "parent->Node.Parent == %p\n", parent->Node.Parent);
ok(parent->FirstChild == (WSDXML_NODE *)child1, "parent->FirstChild == %p\n", parent->FirstChild);
@@ -189,7 +189,7 @@ static void AddSibling_tests(void)
/* Test invalid values */
hr = WSDXMLAddSibling(NULL, NULL);
- ok(hr == E_INVALIDARG, "WSDXMLAddSibling failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "WSDXMLAddSibling failed with %08lx\n", hr);
/* Populate structures */
ns.Uri = L"http://test.test/";
@@ -206,20 +206,20 @@ static void AddSibling_tests(void)
/* Create some elements */
hr = WSDXMLBuildAnyForSingleElement(&parentName, NULL, &parent);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child1Name, child1NameText, &child1);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child2Name, NULL, &child2);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child2Name, NULL, &child3);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
/* Add child1 to parent */
hr = WSDXMLAddChild(parent, child1);
- ok(hr == S_OK, "WSDXMLAddChild failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLAddChild failed with %08lx\n", hr);
ok(parent->Node.Parent == NULL, "parent->Node.Parent == %p\n", parent->Node.Parent);
ok(parent->FirstChild == (WSDXML_NODE *)child1, "parent->FirstChild == %p\n", parent->FirstChild);
@@ -234,7 +234,7 @@ static void AddSibling_tests(void)
/* Try to add child2 as sibling of child1 */
hr = WSDXMLAddSibling(child1, child2);
- ok(hr == S_OK, "WSDXMLAddSibling failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLAddSibling failed with %08lx\n", hr);
ok(child1->Node.Parent == parent, "child1->Node.Parent == %p\n", child1->Node.Parent);
ok(child1->Node.Next == (WSDXML_NODE *)child2, "child1->Node.Next == %p\n", child1->Node.Next);
@@ -244,7 +244,7 @@ static void AddSibling_tests(void)
/* Try to add child3 as sibling of child1 */
hr = WSDXMLAddSibling(child1, child3);
- ok(hr == S_OK, "WSDXMLAddSibling failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLAddSibling failed with %08lx\n", hr);
ok(child1->Node.Parent == parent, "child1->Node.Parent == %p\n", child1->Node.Parent);
ok(child1->Node.Next == (WSDXML_NODE *)child2, "child1->Node.Next == %p\n", child1->Node.Next);
@@ -293,71 +293,71 @@ static void GetValueFromAny_tests(void)
/* Create some elements */
hr = WSDXMLBuildAnyForSingleElement(&parentName, NULL, &parent);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child1Name, child1Value, &child1);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child2Name, child2Value, &child2);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
hr = WSDXMLBuildAnyForSingleElement(&child3Name, NULL, &child3);
- ok(hr == S_OK, "BuildAnyForSingleElement failed with %08x\n", hr);
+ ok(hr == S_OK, "BuildAnyForSingleElement failed with %08lx\n", hr);
/* Attach them to the parent element */
hr = WSDXMLAddChild(parent, child1);
- ok(hr == S_OK, "AddChild failed with %08x\n", hr);
+ ok(hr == S_OK, "AddChild failed with %08lx\n", hr);
hr = WSDXMLAddChild(parent, child2);
- ok(hr == S_OK, "AddChild failed with %08x\n", hr);
+ ok(hr == S_OK, "AddChild failed with %08lx\n", hr);
hr = WSDXMLAddChild(parent, child3);
- ok(hr == S_OK, "AddChild failed with %08x\n", hr);
+ ok(hr == S_OK, "AddChild failed with %08lx\n", hr);
/* Test invalid arguments */
hr = WSDXMLGetValueFromAny(NULL, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08lx\n", hr);
hr = WSDXMLGetValueFromAny(NULL, NULL, NULL, &returnedValue);
- ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08lx\n", hr);
hr = WSDXMLGetValueFromAny(NULL, NULL, parent, NULL);
- ok(hr == E_POINTER, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_POINTER, "GetValueFromAny returned unexpected result: %08lx\n", hr);
hr = WSDXMLGetValueFromAny(uri, NULL, parent, NULL);
- ok(hr == E_POINTER, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_POINTER, "GetValueFromAny returned unexpected result: %08lx\n", hr);
hr = WSDXMLGetValueFromAny(uri, child2NameText, parent, NULL);
- ok(hr == E_POINTER, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_POINTER, "GetValueFromAny returned unexpected result: %08lx\n", hr);
/* Test calling the function with a text size that exceeds 8192 characters */
hr = WSDXMLGetValueFromAny(largeText, child2NameText, parent, &returnedValue);
- ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08lx\n", hr);
hr = WSDXMLGetValueFromAny(uri, largeText, parent, &returnedValue);
- ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08x\n", hr);
+ ok(hr == E_INVALIDARG, "GetValueFromAny returned unexpected result: %08lx\n", hr);
/* Test with valid parameters */
hr = WSDXMLGetValueFromAny(uri, child2NameText, child1, &returnedValue);
- ok(hr == S_OK, "GetValueFromAny failed with %08x\n", hr);
+ ok(hr == S_OK, "GetValueFromAny failed with %08lx\n", hr);
ok(returnedValue != NULL, "returnedValue == NULL\n");
ok(lstrcmpW(returnedValue, child2Value) == 0, "returnedValue ('%s') != '%s'\n", wine_dbgstr_w(returnedValue), wine_dbgstr_w(child2Value));
hr = WSDXMLGetValueFromAny(uri2, child1NameText, child1, &returnedValue);
- ok(hr == S_OK, "GetValueFromAny failed with %08x\n", hr);
+ ok(hr == S_OK, "GetValueFromAny failed with %08lx\n", hr);
ok(returnedValue != NULL, "returnedValue == NULL\n");
ok(lstrcmpW(returnedValue, child1Value) == 0, "returnedValue ('%s') != '%s'\n", wine_dbgstr_w(returnedValue), wine_dbgstr_w(child1Value));
oldReturnedValue = returnedValue;
hr = WSDXMLGetValueFromAny(uri2, child2NameText, child1, &returnedValue);
- ok(hr == E_FAIL, "GetValueFromAny returned unexpected value: %08x\n", hr);
+ ok(hr == E_FAIL, "GetValueFromAny returned unexpected value: %08lx\n", hr);
ok(returnedValue == oldReturnedValue, "returnedValue == %p\n", returnedValue);
oldReturnedValue = returnedValue;
hr = WSDXMLGetValueFromAny(uri, child3NameText, child1, &returnedValue);
- ok(hr == E_FAIL, "GetValueFromAny failed with %08x\n", hr);
+ ok(hr == E_FAIL, "GetValueFromAny failed with %08lx\n", hr);
ok(returnedValue == oldReturnedValue, "returnedValue == %p\n", returnedValue);
WSDFreeLinkedMemory(parent);
@@ -377,26 +377,26 @@ static void XMLContext_AddNamespace_tests(void)
HRESULT hr;
hr = WSDXMLCreateContext(&context);
- ok(hr == S_OK, "WSDXMLCreateContext failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLCreateContext failed with %08lx\n", hr);
ok(context != NULL, "context == NULL\n");
/* Test calling AddNamespace with invalid arguments */
hr = IWSDXMLContext_AddNamespace(context, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "AddNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNamespace(context, ns1Uri, NULL, NULL);
- ok(hr == E_INVALIDARG, "AddNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNamespace(context, NULL, prefix1, NULL);
- ok(hr == E_INVALIDARG, "AddNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNamespace failed with %08lx\n", hr);
/* Test calling AddNamespace without the ppNamespace parameter */
hr = IWSDXMLContext_AddNamespace(context, ns1Uri, prefix1, NULL);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Now retrieve the created namespace */
hr = IWSDXMLContext_AddNamespace(context, ns1Uri, prefix1, &ns1);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(ns1 != NULL, "ns1 == NULL\n");
@@ -413,17 +413,17 @@ static void XMLContext_AddNamespace_tests(void)
/* Test calling AddNamespace with parameters that are too large */
hr = IWSDXMLContext_AddNamespace(context, largeText, prefix2, &ns2);
- ok(hr == E_INVALIDARG, "AddNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNamespace(context, ns2Uri, largeText, &ns2);
- ok(hr == E_INVALIDARG, "AddNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNamespace(context, largeText, largeText, &ns2);
- ok(hr == E_INVALIDARG, "AddNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNamespace failed with %08lx\n", hr);
/* Test calling AddNamespace with a conflicting prefix */
hr = IWSDXMLContext_AddNamespace(context, ns2Uri, prefix1, &ns2);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(ns2 != NULL, "ns2 == NULL\n");
@@ -443,7 +443,7 @@ static void XMLContext_AddNamespace_tests(void)
/* Try explicitly creating a prefix called 'un1' */
hr = IWSDXMLContext_AddNamespace(context, L"http://one.more", unPrefix1, &ns2);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(ns2 != NULL, "ns2 == NULL\n");
@@ -457,7 +457,7 @@ static void XMLContext_AddNamespace_tests(void)
/* Test with one more conflicting prefix */
hr = IWSDXMLContext_AddNamespace(context, ns3Uri, prefix1, &ns2);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(ns2 != NULL, "ns2 == NULL\n");
@@ -471,7 +471,7 @@ static void XMLContext_AddNamespace_tests(void)
/* Try renaming a prefix */
hr = IWSDXMLContext_AddNamespace(context, ns3Uri, prefix2, &ns2);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(ns2 != NULL, "ns2 == NULL\n");
@@ -500,25 +500,25 @@ static void XMLContext_AddNameToNamespace_tests(void)
HRESULT hr;
hr = WSDXMLCreateContext(&context);
- ok(hr == S_OK, "WSDXMLCreateContext failed with %08x\n", hr);
+ ok(hr == S_OK, "WSDXMLCreateContext failed with %08lx\n", hr);
/* Test calling AddNameToNamespace with invalid arguments */
hr = IWSDXMLContext_AddNameToNamespace(context, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNameToNamespace(context, ns1Uri, NULL, NULL);
- ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNameToNamespace(context, NULL, name1Text, NULL);
- ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08lx\n", hr);
/* Test calling AddNameToNamespace without the ppName parameter */
hr = IWSDXMLContext_AddNameToNamespace(context, ns1Uri, name1Text, NULL);
- ok(hr == S_OK, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNameToNamespace failed with %08lx\n", hr);
/* Now retrieve the created name */
hr = IWSDXMLContext_AddNameToNamespace(context, ns1Uri, name1Text, &name1);
- ok(hr == S_OK, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNameToNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(name1 != NULL, "name1 == NULL\n");
@@ -538,18 +538,18 @@ static void XMLContext_AddNameToNamespace_tests(void)
/* Test calling AddNamespace with parameters that are too large */
hr = IWSDXMLContext_AddNameToNamespace(context, largeText, name1Text, &name2);
- ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08lx\n", hr);
hr = IWSDXMLContext_AddNameToNamespace(context, ns1Uri, largeText, &name2);
- ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == E_INVALIDARG, "AddNameToNamespace failed with %08lx\n", hr);
/* Try creating a namespace explicitly */
hr = IWSDXMLContext_AddNamespace(context, ns2Uri, prefix2, &ns2);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Now add a name to it */
hr = IWSDXMLContext_AddNameToNamespace(context, ns2Uri, name2Text, &name2);
- ok(hr == S_OK, "AddNameToNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNameToNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(name2 != NULL, "name2 == NULL\n");
@@ -574,7 +574,7 @@ static void XMLContext_AddNameToNamespace_tests(void)
/* Now re-retrieve ns2 */
hr = IWSDXMLContext_AddNamespace(context, ns2Uri, prefix2, &ns2);
- ok(hr == S_OK, "AddNamespace failed with %08x\n", hr);
+ ok(hr == S_OK, "AddNamespace failed with %08lx\n", hr);
/* Check the returned structure */
ok(ns2 != NULL, "ns2 == NULL\n");
1
0
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ws2_32/tests/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index a0bbde875d3..38c8b65ccdb 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2633,7 +2633,7 @@ static void test_WSASocket(void)
int wsaproviders[] = {IPPROTO_TCP, IPPROTO_IP};
int autoprotocols[] = {IPPROTO_TCP, IPPROTO_UDP};
int items, err, size, socktype, i, j;
- UINT pi_size;
+ DWORD pi_size;
static const struct
{
1
1
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wpc/tests/Makefile.in | 1 -
dlls/wpc/tests/wpc.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/wpc/tests/Makefile.in b/dlls/wpc/tests/Makefile.in
index 45098b8fbf9..72f550d576f 100644
--- a/dlls/wpc/tests/Makefile.in
+++ b/dlls/wpc/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wpc.dll
IMPORTS = ole32
diff --git a/dlls/wpc/tests/wpc.c b/dlls/wpc/tests/wpc.c
index 2cf35ccf6ec..3dbf595a9a7 100644
--- a/dlls/wpc/tests/wpc.c
+++ b/dlls/wpc/tests/wpc.c
@@ -32,7 +32,7 @@ static void test_wpc(void)
if(hres == REGDB_E_CLASSNOTREG)
win_skip("CLSID_WindowsParentalControls not registered\n");
else
- ok(hres == S_OK, "Could not create CLSID_WindowsParentalControls instance: %08x\n", hres);
+ ok(hres == S_OK, "Could not create CLSID_WindowsParentalControls instance: %08lx\n", hres);
if(FAILED(hres))
return;
1
0
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wmvcore/tests/Makefile.in | 1
dlls/wmvcore/tests/wmvcore.c | 778 ++++++++++++++++++++--------------------
2 files changed, 389 insertions(+), 390 deletions(-)
diff --git a/dlls/wmvcore/tests/Makefile.in b/dlls/wmvcore/tests/Makefile.in
index 159de067e06..856e02d45d5 100644
--- a/dlls/wmvcore/tests/Makefile.in
+++ b/dlls/wmvcore/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wmvcore.dll
IMPORTS = ole32 wmvcore
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 1b9cffaee1d..50a7a023488 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -60,11 +60,11 @@ static WCHAR *load_resource(const WCHAR *name)
wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n",
+ ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n",
wine_dbgstr_w(pathW), GetLastError());
res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA);
- ok(!!res, "Failed to load resource, error %u.\n", GetLastError());
+ ok(!!res, "Failed to load resource, error %lu.\n", GetLastError());
ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res));
WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL);
ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n");
@@ -82,7 +82,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOO
expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(unknown, riid, (void **)&out);
- ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(out);
return hr;
@@ -94,7 +94,7 @@ static void test_wmwriter_interfaces(void)
IWMWriter *writer;
hr = WMCreateWriter( NULL, &writer );
- ok(hr == S_OK, "WMCreateWriter failed 0x%08x\n", hr);
+ ok(hr == S_OK, "WMCreateWriter failed 0x%08lx\n", hr);
if(FAILED(hr))
{
win_skip("Failed to create IWMWriter\n");
@@ -121,7 +121,7 @@ static void test_wmreader_interfaces(void)
IWMReader *reader;
hr = WMCreateReader( NULL, 0, &reader );
- ok(hr == S_OK, "WMCreateReader failed 0x%08x\n", hr);
+ ok(hr == S_OK, "WMCreateReader failed 0x%08lx\n", hr);
if(FAILED(hr))
{
win_skip("Failed to create IWMReader\n");
@@ -168,7 +168,7 @@ static void test_wmsyncreader_interfaces(void)
IWMSyncReader *reader;
hr = WMCreateSyncReader( NULL, 0, &reader );
- ok(hr == S_OK, "WMCreateSyncReader failed 0x%08x\n", hr);
+ ok(hr == S_OK, "WMCreateSyncReader failed 0x%08lx\n", hr);
if(FAILED(hr))
{
win_skip("Failed to create IWMSyncReader\n");
@@ -216,7 +216,7 @@ static void test_profile_manager_interfaces(void)
IWMProfileManager *profile;
hr = WMCreateProfileManager(&profile);
- ok(hr == S_OK, "WMCreateProfileManager failed 0x%08x\n", hr);
+ ok(hr == S_OK, "WMCreateProfileManager failed 0x%08lx\n", hr);
if(FAILED(hr))
{
win_skip("Failed to create IWMProfileManager\n");
@@ -232,10 +232,10 @@ static void test_WMCreateWriterPriv(void)
HRESULT hr;
hr = WMCreateWriterPriv(&writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IWMWriter_QueryInterface(writer, &IID_IWMWriter, (void**)&writer2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "got 0x%08lx\n", hr);
IWMWriter_Release(writer);
IWMWriter_Release(writer2);
@@ -246,15 +246,15 @@ static void test_urlextension(void)
HRESULT hr;
hr = WMCheckURLExtension(NULL);
- ok(hr == E_INVALIDARG, "WMCheckURLExtension failed 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "WMCheckURLExtension failed 0x%08lx\n", hr);
hr = WMCheckURLExtension(L"test.mkv");
- ok(hr == NS_E_INVALID_NAME, "WMCheckURLExtension failed 0x%08x\n", hr);
+ ok(hr == NS_E_INVALID_NAME, "WMCheckURLExtension failed 0x%08lx\n", hr);
hr = WMCheckURLExtension(L"test.mp3");
- todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08x\n", hr);
+ todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08lx\n", hr);
hr = WMCheckURLExtension(L"abcd://test/test.wmv");
- todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08x\n", hr);
+ todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08lx\n", hr);
hr = WMCheckURLExtension(L"http://test/t.asf?alt=t.mkv");
- todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08x\n", hr);
+ todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08lx\n", hr);
}
static void test_iscontentprotected(void)
@@ -263,13 +263,13 @@ static void test_iscontentprotected(void)
BOOL drm;
hr = WMIsContentProtected(NULL, NULL);
- ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08lx\n", hr);
hr = WMIsContentProtected(NULL, &drm);
- ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08lx\n", hr);
hr = WMIsContentProtected(L"test.mp3", NULL);
- ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08lx\n", hr);
hr = WMIsContentProtected(L"test.mp3", &drm);
- ok(hr == S_FALSE, "WMIsContentProtected failed 0x%08x\n", hr);
+ ok(hr == S_FALSE, "WMIsContentProtected failed 0x%08lx\n", hr);
ok(drm == FALSE, "got %0dx\n", drm);
}
@@ -292,7 +292,7 @@ static inline struct buffer *impl_from_INSSBuffer(INSSBuffer *iface)
static HRESULT WINAPI buffer_QueryInterface(INSSBuffer *iface, REFIID iid, void **out)
{
if (winetest_debug > 1)
- trace("%04x: INSSBuffer::QueryInterface(%s)\n", GetCurrentThreadId(), debugstr_guid(iid));
+ trace("%04lx: INSSBuffer::QueryInterface(%s)\n", GetCurrentThreadId(), debugstr_guid(iid));
if (!IsEqualGUID(iid, &IID_INSSBuffer3) && !IsEqualGUID(iid, &IID_IMediaBuffer))
ok(0, "Unexpected IID %s.\n", debugstr_guid(iid));
@@ -324,7 +324,7 @@ static HRESULT WINAPI buffer_GetLength(INSSBuffer *iface, DWORD *size)
struct buffer *buffer = impl_from_INSSBuffer(iface);
if (winetest_debug > 1)
- trace("%04x: INSSBuffer::GetLength()\n", GetCurrentThreadId());
+ trace("%04lx: INSSBuffer::GetLength()\n", GetCurrentThreadId());
*size = buffer->size;
return S_OK;
@@ -335,9 +335,9 @@ static HRESULT WINAPI buffer_SetLength(INSSBuffer *iface, DWORD size)
struct buffer *buffer = impl_from_INSSBuffer(iface);
if (winetest_debug > 1)
- trace("%04x: INSSBuffer::SetLength(%u)\n", GetCurrentThreadId(), size);
+ trace("%04lx: INSSBuffer::SetLength(%lu)\n", GetCurrentThreadId(), size);
- ok(size <= buffer->capacity, "Got size %u, buffer capacity %u.\n", size, buffer->capacity);
+ ok(size <= buffer->capacity, "Got size %lu, buffer capacity %lu.\n", size, buffer->capacity);
buffer->size = size;
return S_OK;
@@ -348,7 +348,7 @@ static HRESULT WINAPI buffer_GetMaxLength(INSSBuffer *iface, DWORD *size)
struct buffer *buffer = impl_from_INSSBuffer(iface);
if (winetest_debug > 1)
- trace("%04x: INSSBuffer::GetMaxLength()\n", GetCurrentThreadId());
+ trace("%04lx: INSSBuffer::GetMaxLength()\n", GetCurrentThreadId());
*size = buffer->capacity;
return S_OK;
@@ -359,7 +359,7 @@ static HRESULT WINAPI buffer_GetBuffer(INSSBuffer *iface, BYTE **data)
struct buffer *buffer = impl_from_INSSBuffer(iface);
if (winetest_debug > 1)
- trace("%04x: INSSBuffer::GetBuffer()\n", GetCurrentThreadId());
+ trace("%04lx: INSSBuffer::GetBuffer()\n", GetCurrentThreadId());
*data = buffer->data;
return S_OK;
@@ -370,7 +370,7 @@ static HRESULT WINAPI buffer_GetBufferAndLength(INSSBuffer *iface, BYTE **data,
struct buffer *buffer = impl_from_INSSBuffer(iface);
if (winetest_debug > 1)
- trace("%04x: INSSBuffer::GetBufferAndLength()\n", GetCurrentThreadId());
+ trace("%04lx: INSSBuffer::GetBufferAndLength()\n", GetCurrentThreadId());
*size = buffer->size;
*data = buffer->data;
@@ -404,7 +404,7 @@ static struct teststream *impl_from_IStream(IStream *iface)
static HRESULT WINAPI stream_QueryInterface(IStream *iface, REFIID iid, void **out)
{
if (winetest_debug > 1)
- trace("%04x: IStream::QueryInterface(%s)\n", GetCurrentThreadId(), debugstr_guid(iid));
+ trace("%04lx: IStream::QueryInterface(%s)\n", GetCurrentThreadId(), debugstr_guid(iid));
if (!IsEqualGUID(iid, &IID_IWMGetSecureChannel) && !IsEqualGUID(iid, &IID_IWMIStreamProps))
ok(0, "Unexpected IID %s.\n", debugstr_guid(iid));
@@ -431,7 +431,7 @@ static HRESULT WINAPI stream_Read(IStream *iface, void *data, ULONG size, ULONG
struct teststream *stream = impl_from_IStream(iface);
if (winetest_debug > 2)
- trace("%04x: IStream::Read(size %u)\n", GetCurrentThreadId(), size);
+ trace("%04lx: IStream::Read(size %lu)\n", GetCurrentThreadId(), size);
ok(size > 0, "Got zero size.\n");
ok(!!ret_size, "Got NULL ret_size pointer.\n");
@@ -452,13 +452,13 @@ static HRESULT WINAPI stream_Seek(IStream *iface, LARGE_INTEGER offset, DWORD me
LARGE_INTEGER size;
if (winetest_debug > 2)
- trace("%04x: IStream::Seek(offset %I64u, method %#x)\n", GetCurrentThreadId(), offset.QuadPart, method);
+ trace("%04lx: IStream::Seek(offset %I64u, method %#lx)\n", GetCurrentThreadId(), offset.QuadPart, method);
GetFileSizeEx(stream->file, &size);
ok(offset.QuadPart < size.QuadPart, "Expected offset less than size %I64u, got %I64u.\n",
size.QuadPart, offset.QuadPart);
- ok(method == STREAM_SEEK_SET, "Got method %#x.\n", method);
+ ok(method == STREAM_SEEK_SET, "Got method %#lx.\n", method);
ok(!ret_offset, "Got unexpected ret_offset pointer %p\n", ret_offset);
if (!SetFilePointerEx(stream->file, offset, &offset, method))
@@ -509,9 +509,9 @@ static HRESULT WINAPI stream_Stat(IStream *iface, STATSTG *stat, DWORD flags)
LARGE_INTEGER size;
if (winetest_debug > 1)
- trace("%04x: IStream::Stat(flags %#x)\n", GetCurrentThreadId(), flags);
+ trace("%04lx: IStream::Stat(flags %#lx)\n", GetCurrentThreadId(), flags);
- ok(flags == STATFLAG_NONAME, "Got flags %#x.\n", flags);
+ ok(flags == STATFLAG_NONAME, "Got flags %#lx.\n", flags);
stat->type = 0xdeadbeef;
GetFileSizeEx(stream->file, &size);
@@ -568,15 +568,15 @@ static void test_reader_attributes(IWMProfile *profile)
IWMProfile_QueryInterface(profile, &IID_IWMHeaderInfo, (void **)&header_info);
hr = IWMProfile_GetStreamCount(profile, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 2, "Got count %lu.\n", count);
for (i = 0; i < count; ++i)
{
hr = IWMProfile_GetStream(profile, i, &config);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMStreamConfig_GetStreamNumber(config, &stream_number);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret_stream_number = stream_number;
size = sizeof(DWORD);
@@ -584,10 +584,10 @@ static void test_reader_attributes(IWMProfile *profile)
dword = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &ret_stream_number,
L"WM/VideoFrameRate", &type, (BYTE *)&dword, &size);
- ok(hr == ASF_E_NOTFOUND, "Got hr %#x.\n", hr);
+ ok(hr == ASF_E_NOTFOUND, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(DWORD), "Got size %u.\n", size);
- ok(dword == 0xdeadbeef, "Got frame rate %u.\n", dword);
+ ok(dword == 0xdeadbeef, "Got frame rate %lu.\n", dword);
ok(ret_stream_number == stream_number, "Expected stream number %u, got %u.\n",
stream_number, ret_stream_number);
@@ -596,7 +596,7 @@ static void test_reader_attributes(IWMProfile *profile)
duration = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &ret_stream_number,
L"Duration", &type, (BYTE *)&duration, &size);
- ok(hr == ASF_E_NOTFOUND, "Got hr %#x.\n", hr);
+ ok(hr == ASF_E_NOTFOUND, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(QWORD), "Got size %u.\n", size);
ok(ret_stream_number == stream_number, "Expected stream number %u, got %u.\n",
@@ -607,7 +607,7 @@ static void test_reader_attributes(IWMProfile *profile)
dword = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &ret_stream_number,
L"Seekable", &type, (BYTE *)&dword, &size);
- ok(hr == ASF_E_NOTFOUND, "Got hr %#x.\n", hr);
+ ok(hr == ASF_E_NOTFOUND, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(DWORD), "Got size %u.\n", size);
ok(ret_stream_number == stream_number, "Expected stream number %u, got %u.\n",
@@ -623,10 +623,10 @@ static void test_reader_attributes(IWMProfile *profile)
dword = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, NULL,
L"WM/VideoFrameRate", &type, (BYTE *)&dword, &size);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(DWORD), "Got size %u.\n", size);
- ok(dword == 0xdeadbeef, "Got frame rate %u.\n", dword);
+ ok(dword == 0xdeadbeef, "Got frame rate %lu.\n", dword);
/* And with a zero stream number. */
@@ -636,10 +636,10 @@ static void test_reader_attributes(IWMProfile *profile)
dword = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &stream_number,
L"WM/VideoFrameRate", &type, (BYTE *)&dword, &size);
- ok(hr == ASF_E_NOTFOUND, "Got hr %#x.\n", hr);
+ ok(hr == ASF_E_NOTFOUND, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(DWORD), "Got size %u.\n", size);
- ok(dword == 0xdeadbeef, "Got frame rate %u.\n", dword);
+ ok(dword == 0xdeadbeef, "Got frame rate %lu.\n", dword);
ok(stream_number == 0, "Got stream number %u.\n", stream_number);
/* Duration with a NULL stream number. */
@@ -649,7 +649,7 @@ static void test_reader_attributes(IWMProfile *profile)
duration = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, NULL,
L"Duration", &type, (BYTE *)&duration, &size);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(QWORD), "Got size %u.\n", size);
ok(duration == 0xdeadbeef, "Got duration %I64u.\n", duration);
@@ -661,7 +661,7 @@ static void test_reader_attributes(IWMProfile *profile)
duration = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &stream_number,
L"Duration", &type, (BYTE *)&duration, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(type == WMT_TYPE_QWORD, "Got type %#x.\n", type);
ok(size == sizeof(QWORD), "Got size %u.\n", size);
ok(duration == 20460000, "Got duration %I64u.\n", duration);
@@ -674,7 +674,7 @@ static void test_reader_attributes(IWMProfile *profile)
duration = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &stream_number,
L"Duration", &type, (BYTE *)&duration, &size);
- ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#x.\n", hr);
+ ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#lx.\n", hr);
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
ok(size == sizeof(QWORD), "Got size %u.\n", size);
ok(duration == 0xdeadbeef, "Got duration %I64u.\n", duration);
@@ -686,7 +686,7 @@ static void test_reader_attributes(IWMProfile *profile)
type = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &stream_number,
L"Duration", &type, NULL, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(type == WMT_TYPE_QWORD, "Got type %#x.\n", type);
ok(size == sizeof(QWORD), "Got size %u.\n", size);
ok(stream_number == 0, "Got stream number %u.\n", stream_number);
@@ -696,7 +696,7 @@ static void test_reader_attributes(IWMProfile *profile)
dword = 0xdeadbeef;
hr = IWMHeaderInfo_GetAttributeByName(header_info, &stream_number,
L"Seekable", &type, (BYTE *)&dword, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(type == WMT_TYPE_BOOL, "Got type %#x.\n", type);
ok(size == sizeof(DWORD), "Got size %u.\n", size);
ok(dword == TRUE, "Got duration %I64u.\n", duration);
@@ -716,58 +716,58 @@ static void test_sync_reader_selection(IWMSyncReader *reader)
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 0, &selections[0]);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(selections[0] == 0xdeadbeef, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 1, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 2, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 3, &selections[0]);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(selections[0] == 0xdeadbeef, "Got selection %#x.\n", selections[0]);
hr = IWMSyncReader_SetStreamsSelected(reader, 0, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
stream_numbers[0] = 1;
stream_numbers[1] = 0;
selections[0] = selections[1] = WMT_OFF;
hr = IWMSyncReader_SetStreamsSelected(reader, 2, stream_numbers, selections);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 1, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
stream_numbers[0] = stream_numbers[1] = 1;
selections[0] = selections[1] = WMT_OFF;
hr = IWMSyncReader_SetStreamsSelected(reader, 2, stream_numbers, selections);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 1, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_OFF, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMSyncReader_GetStreamSelected(reader, 2, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
hr = IWMSyncReader_GetNextSample(reader, 1, &sample, &pts, &duration, &flags, NULL, NULL);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, 2, &sample, &pts, &duration, &flags, NULL, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
for (;;)
@@ -775,19 +775,19 @@ static void test_sync_reader_selection(IWMSyncReader *reader)
hr = IWMSyncReader_GetNextSample(reader, 2, &sample, &pts, &duration, &flags, NULL, NULL);
if (hr == NS_E_NO_MORE_SAMPLES)
break;
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
}
hr = IWMSyncReader_GetNextSample(reader, 1, &sample, &pts, &duration, &flags, NULL, NULL);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetRange(reader, 0, 0);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration,
&flags, NULL, &stream_numbers[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(stream_numbers[0] == 2, "Got stream number %u.\n", stream_numbers[0]);
INSSBuffer_Release(sample);
@@ -797,7 +797,7 @@ static void test_sync_reader_selection(IWMSyncReader *reader)
&flags, NULL, &stream_numbers[0]);
if (hr == NS_E_NO_MORE_SAMPLES)
break;
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(stream_numbers[0] == 2, "Got stream number %u.\n", stream_numbers[0]);
INSSBuffer_Release(sample);
}
@@ -805,20 +805,20 @@ static void test_sync_reader_selection(IWMSyncReader *reader)
stream_numbers[0] = stream_numbers[1] = 2;
selections[0] = selections[1] = WMT_OFF;
hr = IWMSyncReader_SetStreamsSelected(reader, 2, stream_numbers, selections);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetRange(reader, 0, 0);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration,
&flags, NULL, &stream_numbers[0]);
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
stream_numbers[0] = 1;
stream_numbers[1] = 2;
selections[0] = selections[1] = WMT_ON;
hr = IWMSyncReader_SetStreamsSelected(reader, 2, stream_numbers, selections);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
static void test_sync_reader_compressed(IWMSyncReader *reader)
@@ -830,19 +830,19 @@ static void test_sync_reader_compressed(IWMSyncReader *reader)
HRESULT hr;
hr = IWMSyncReader_SetReadStreamSamples(reader, 0, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetReadStreamSamples(reader, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetReadStreamSamples(reader, 2, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetReadStreamSamples(reader, 3, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetRange(reader, 0, 0);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration, &flags, NULL, &stream_number);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
for (;;)
@@ -850,14 +850,14 @@ static void test_sync_reader_compressed(IWMSyncReader *reader)
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration, &flags, NULL, &stream_number);
if (hr == NS_E_NO_MORE_SAMPLES)
break;
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
}
hr = IWMSyncReader_SetReadStreamSamples(reader, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetReadStreamSamples(reader, 2, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
static void test_sync_reader_streaming(void)
@@ -879,53 +879,53 @@ static void test_sync_reader_streaming(void)
BOOL ret;
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", debugstr_w(file), GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %lu.\n", debugstr_w(file), GetLastError());
teststream_init(&stream, file);
hr = WMCreateSyncReader(NULL, 0, &reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IWMSyncReader_QueryInterface(reader, &IID_IWMProfile, (void **)&profile);
hr = IWMSyncReader_OpenStream(reader, &stream.IStream_iface);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(stream.refcount > 1, "Got refcount %d.\n", stream.refcount);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(stream.refcount > 1, "Got refcount %ld.\n", stream.refcount);
hr = IWMProfile_GetStreamCount(profile, NULL);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
count = 0xdeadbeef;
hr = IWMProfile_GetStreamCount(profile, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 2, "Got count %lu.\n", count);
count = 0xdeadbeef;
hr = IWMSyncReader_GetOutputCount(reader, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 2, "Got count %lu.\n", count);
for (i = 0; i < 2; ++i)
{
hr = IWMProfile_GetStream(profile, i, &config);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMProfile_GetStream(profile, i, &config2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(config2 != config, "Expected different objects.\n");
ref = IWMStreamConfig_Release(config2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
stream_numbers[i] = 0xdead;
hr = IWMStreamConfig_GetStreamNumber(config, &stream_numbers[i]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(stream_numbers[i] == i + 1, "Got stream number %u.\n", stream_numbers[i]);
ref = IWMStreamConfig_Release(config);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
hr = IWMProfile_GetStream(profile, 2, &config);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
while (!eos[0] || !eos[1])
{
@@ -935,50 +935,50 @@ static void test_sync_reader_streaming(void)
hr = IWMSyncReader_GetNextSample(reader, stream_numbers[j], &sample,
&pts, &duration, &flags, &output_number, &stream_number);
if (first)
- ok(hr == S_OK, "Expected at least one valid sample; got hr %#x.\n", hr);
+ ok(hr == S_OK, "Expected at least one valid sample; got hr %#lx.\n", hr);
else if (eos[j])
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
else
- ok(hr == S_OK || hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == S_OK || hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
if (hr == S_OK)
{
hr = INSSBuffer_GetBufferAndLength(sample, &data, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = INSSBuffer_GetBuffer(sample, &data2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(data2 == data, "Data pointers didn't match.\n");
hr = INSSBuffer_GetMaxLength(sample, &capacity);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(size <= capacity, "Size %u exceeds capacity %u.\n", size, capacity);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size <= capacity, "Size %lu exceeds capacity %lu.\n", size, capacity);
hr = INSSBuffer_SetLength(sample, capacity + 1);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = INSSBuffer_SetLength(sample, capacity - 1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = INSSBuffer_GetBufferAndLength(sample, &data2, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(data2 == data, "Data pointers didn't match.\n");
- ok(size == capacity - 1, "Expected size %u, got %u.\n", capacity - 1, size);
+ ok(size == capacity - 1, "Expected size %lu, got %lu.\n", capacity - 1, size);
ref = INSSBuffer_Release(sample);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IWMSyncReader_GetOutputNumberForStream(reader, stream_number, &expect_output_number);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(output_number == expect_output_number, "Expected output number %u, got %u.\n",
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(output_number == expect_output_number, "Expected output number %lu, got %lu.\n",
expect_output_number, output_number);
}
else
{
ok(pts == 0xdeadbeef, "Got PTS %I64u.\n", pts);
ok(duration == 0xdeadbeef, "Got duration %I64u.\n", duration);
- ok(flags == 0xdeadbeef, "Got flags %#x.\n", flags);
- ok(output_number == 0xdeadbeef, "Got output number %u.\n", output_number);
+ ok(flags == 0xdeadbeef, "Got flags %#lx.\n", flags);
+ ok(output_number == 0xdeadbeef, "Got output number %lu.\n", output_number);
eos[j] = true;
}
@@ -990,28 +990,28 @@ static void test_sync_reader_streaming(void)
hr = IWMSyncReader_GetNextSample(reader, stream_numbers[0], &sample,
&pts, &duration, &flags, NULL, NULL);
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, stream_numbers[1], &sample,
&pts, &duration, &flags, NULL, NULL);
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetRange(reader, 0, 0);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, stream_numbers[0], &sample, &pts, &duration, &flags, NULL, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration, &flags, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration, &flags, &output_number, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
hr = IWMSyncReader_GetNextSample(reader, 0, &sample, &pts, &duration, &flags, NULL, &stream_number);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
INSSBuffer_Release(sample);
for (;;)
@@ -1019,30 +1019,30 @@ static void test_sync_reader_streaming(void)
stream_number = pts = duration = flags = output_number = 0xdeadbeef;
hr = IWMSyncReader_GetNextSample(reader, 0, &sample,
&pts, &duration, &flags, &output_number, &stream_number);
- ok(hr == S_OK || hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == S_OK || hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
if (hr == S_OK)
{
hr = INSSBuffer_GetBufferAndLength(sample, &data, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = INSSBuffer_GetBuffer(sample, &data2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(data2 == data, "Data pointers didn't match.\n");
hr = INSSBuffer_GetMaxLength(sample, &capacity);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(size <= capacity, "Size %u exceeds capacity %u.\n", size, capacity);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size <= capacity, "Size %lu exceeds capacity %lu.\n", size, capacity);
ref = INSSBuffer_Release(sample);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
else
{
ok(pts == 0xdeadbeef, "Got PTS %I64u.\n", pts);
ok(duration == 0xdeadbeef, "Got duration %I64u.\n", duration);
- ok(flags == 0xdeadbeef, "Got flags %#x.\n", flags);
- ok(output_number == 0xdeadbeef, "Got output number %u.\n", output_number);
+ ok(flags == 0xdeadbeef, "Got flags %#lx.\n", flags);
+ ok(output_number == 0xdeadbeef, "Got output number %lu.\n", output_number);
ok(stream_number == 0xbeef, "Got stream number %u.\n", stream_number);
break;
}
@@ -1050,18 +1050,18 @@ static void test_sync_reader_streaming(void)
hr = IWMSyncReader_GetNextSample(reader, 0, &sample,
&pts, &duration, &flags, NULL, &stream_number);
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, stream_numbers[0], &sample,
&pts, &duration, &flags, NULL, NULL);
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetNextSample(reader, stream_numbers[1], &sample,
&pts, &duration, &flags, NULL, NULL);
- ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_NO_MORE_SAMPLES, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetRange(reader, 0, 0);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_sync_reader_selection(reader);
test_sync_reader_compressed(reader);
@@ -1069,26 +1069,26 @@ static void test_sync_reader_streaming(void)
test_reader_attributes(profile);
hr = IWMSyncReader_Close(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_Close(reader);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
- ok(stream.refcount == 1, "Got outstanding refcount %d.\n", stream.refcount);
+ ok(stream.refcount == 1, "Got outstanding refcount %ld.\n", stream.refcount);
SetFilePointer(stream.file, 0, NULL, FILE_BEGIN);
hr = IWMSyncReader_OpenStream(reader, &stream.IStream_iface);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(stream.refcount > 1, "Got refcount %d.\n", stream.refcount);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(stream.refcount > 1, "Got refcount %ld.\n", stream.refcount);
IWMProfile_Release(profile);
ref = IWMSyncReader_Release(reader);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
- ok(stream.refcount == 1, "Got outstanding refcount %d.\n", stream.refcount);
+ ok(stream.refcount == 1, "Got outstanding refcount %ld.\n", stream.refcount);
CloseHandle(stream.file);
ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
}
static void check_video_type(const WM_MEDIA_TYPE *mt)
@@ -1103,12 +1103,12 @@ static void check_video_type(const WM_MEDIA_TYPE *mt)
ok(EqualRect(&video_info->rcSource, &rect), "Got source rect %s.\n", wine_dbgstr_rect(&rect));
ok(EqualRect(&video_info->rcTarget, &rect), "Got target rect %s.\n", wine_dbgstr_rect(&rect));
- ok(!video_info->dwBitRate, "Got bit rate %u.\n", video_info->dwBitRate);
- ok(!video_info->dwBitErrorRate, "Got bit error rate %u.\n", video_info->dwBitErrorRate);
+ ok(!video_info->dwBitRate, "Got bit rate %lu.\n", video_info->dwBitRate);
+ ok(!video_info->dwBitErrorRate, "Got bit error rate %lu.\n", video_info->dwBitErrorRate);
ok(video_info->bmiHeader.biSize == sizeof(video_info->bmiHeader),
- "Got size %u.\n", video_info->bmiHeader.biSize);
- ok(video_info->bmiHeader.biWidth == 64, "Got width %d.\n", video_info->bmiHeader.biWidth);
- ok(video_info->bmiHeader.biHeight == 48, "Got height %d.\n", video_info->bmiHeader.biHeight);
+ "Got size %lu.\n", video_info->bmiHeader.biSize);
+ ok(video_info->bmiHeader.biWidth == 64, "Got width %ld.\n", video_info->bmiHeader.biWidth);
+ ok(video_info->bmiHeader.biHeight == 48, "Got height %ld.\n", video_info->bmiHeader.biHeight);
ok(video_info->bmiHeader.biPlanes == 1, "Got planes %d.\n", video_info->bmiHeader.biPlanes);
}
@@ -1134,24 +1134,24 @@ static void test_stream_media_props(IWMStreamConfig *config, const GUID *majorty
HRESULT hr;
hr = IWMStreamConfig_QueryInterface(config, &IID_IWMMediaProps, (void **)&props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
size = 0xdeadbeef;
hr = IWMMediaProps_GetMediaType(props, NULL, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(size != 0xdeadbeef && size >= sizeof(WM_MEDIA_TYPE), "Got size %u.\n", size);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size != 0xdeadbeef && size >= sizeof(WM_MEDIA_TYPE), "Got size %lu.\n", size);
ret_size = size - 1;
hr = IWMMediaProps_GetMediaType(props, mt, &ret_size);
- ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#x.\n", hr);
- ok(ret_size == size, "Expected size %u, got %u.\n", size, ret_size);
+ ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#lx.\n", hr);
+ ok(ret_size == size, "Expected size %lu, got %lu.\n", size, ret_size);
ret_size = sizeof(mt_buffer);
memset(mt_buffer, 0xcc, sizeof(mt_buffer));
hr = IWMMediaProps_GetMediaType(props, mt, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(ret_size == size, "Expected size %u, got %u.\n", size, ret_size);
- ok(size == sizeof(WM_MEDIA_TYPE) + mt->cbFormat, "Expected size %u, got %u.\n",
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(ret_size == size, "Expected size %lu, got %lu.\n", size, ret_size);
+ ok(size == sizeof(WM_MEDIA_TYPE) + mt->cbFormat, "Expected size %Iu, got %lu.\n",
sizeof(WM_MEDIA_TYPE) + mt->cbFormat, size);
ok(IsEqualGUID(&mt->majortype, majortype), "Expected major type %s, got %s.\n",
debugstr_guid(majortype), debugstr_guid(&mt->majortype));
@@ -1180,32 +1180,32 @@ static void test_sync_reader_types(void)
BOOL ret;
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", debugstr_w(file), GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %lu.\n", debugstr_w(file), GetLastError());
teststream_init(&stream, file);
hr = WMCreateSyncReader(NULL, 0, &reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IWMSyncReader_QueryInterface(reader, &IID_IWMProfile, (void **)&profile);
hr = IWMSyncReader_OpenStream(reader, &stream.IStream_iface);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(stream.refcount > 1, "Got refcount %d.\n", stream.refcount);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(stream.refcount > 1, "Got refcount %ld.\n", stream.refcount);
for (i = 0; i < 2; ++i)
{
- winetest_push_context("Stream %u", i);
+ winetest_push_context("Stream %lu", i);
hr = IWMProfile_GetStream(profile, i, &config);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
stream_number = 0xdead;
hr = IWMStreamConfig_GetStreamNumber(config, &stream_number);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(stream_number == i + 1, "Got stream number %u.\n", stream_number);
hr = IWMStreamConfig_GetStreamType(config, &majortype);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (!i)
ok(IsEqualGUID(&majortype, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&majortype));
else
@@ -1214,33 +1214,33 @@ static void test_sync_reader_types(void)
test_stream_media_props(config, &majortype);
ref = IWMStreamConfig_Release(config);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
output_number = 0xdeadbeef;
hr = IWMSyncReader_GetOutputNumberForStream(reader, stream_number, &output_number);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(output_number == 1 - i, "Got output number %u.\n", output_number);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ todo_wine ok(output_number == 1 - i, "Got output number %lu.\n", output_number);
stream_number2 = 0xdead;
hr = IWMSyncReader_GetStreamNumberForOutput(reader, output_number, &stream_number2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(stream_number2 == stream_number, "Expected stream number %u, got %u.\n", stream_number, stream_number2);
hr = IWMSyncReader_GetOutputProps(reader, output_number, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret_size = sizeof(mt_buffer);
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&majortype2, 0xcc, sizeof(majortype2));
hr = IWMOutputMediaProps_GetType(output_props, &majortype2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(IsEqualGUID(&majortype2, &majortype), "Expected major type %s, got %s.\n",
debugstr_guid(&majortype), debugstr_guid(&majortype2));
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
if (IsEqualGUID(&majortype, &MEDIATYPE_Audio))
{
@@ -1256,38 +1256,38 @@ static void test_sync_reader_types(void)
count = 0;
hr = IWMSyncReader_GetOutputFormatCount(reader, output_number, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count > 0, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count > 0, "Got count %lu.\n", count);
for (j = 0; j < count; ++j)
{
- winetest_push_context("Format %u", j);
+ winetest_push_context("Format %lu", j);
hr = IWMSyncReader_GetOutputFormat(reader, output_number, j, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetOutputFormat(reader, output_number, j, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(output_props2 != output_props, "Expected different objects.\n");
ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
size = 0xdeadbeef;
hr = IWMOutputMediaProps_GetMediaType(output_props, NULL, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(size != 0xdeadbeef && size >= sizeof(WM_MEDIA_TYPE), "Got size %u.\n", size);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size != 0xdeadbeef && size >= sizeof(WM_MEDIA_TYPE), "Got size %lu.\n", size);
ret_size = size - 1;
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
- ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#x.\n", hr);
- ok(ret_size == size, "Expected size %u, got %u.\n", size, ret_size);
+ ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#lx.\n", hr);
+ ok(ret_size == size, "Expected size %lu, got %lu.\n", size, ret_size);
ret_size = sizeof(mt_buffer);
memset(mt_buffer, 0xcc, sizeof(mt_buffer));
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(ret_size == size, "Expected size %u, got %u.\n", size, ret_size);
- ok(size == sizeof(WM_MEDIA_TYPE) + mt->cbFormat, "Expected size %u, got %u.\n",
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(ret_size == size, "Expected size %lu, got %lu.\n", size, ret_size);
+ ok(size == sizeof(WM_MEDIA_TYPE) + mt->cbFormat, "Expected size %Iu, got %lu.\n",
sizeof(WM_MEDIA_TYPE) + mt->cbFormat, size);
ok(IsEqualGUID(&mt->majortype, &majortype), "Got major type %s.\n", debugstr_guid(&mt->majortype));
@@ -1299,52 +1299,52 @@ static void test_sync_reader_types(void)
memset(&majortype2, 0xcc, sizeof(majortype2));
hr = IWMOutputMediaProps_GetType(output_props, &majortype2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(IsEqualGUID(&majortype2, &majortype), "Expected major type %s, got %s.\n",
debugstr_guid(&majortype), debugstr_guid(&majortype2));
hr = IWMSyncReader_SetOutputProps(reader, output_number, output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetOutputProps(reader, 1 - output_number, output_props);
if (!i)
- todo_wine ok(hr == ASF_E_BADMEDIATYPE, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == ASF_E_BADMEDIATYPE, "Got hr %#lx.\n", hr);
else
ok(hr == NS_E_INCOMPATIBLE_FORMAT
- || hr == NS_E_INVALID_OUTPUT_FORMAT /* win10 */, "Got hr %#x.\n", hr);
+ || hr == NS_E_INVALID_OUTPUT_FORMAT /* win10 */, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_SetOutputProps(reader, 2, output_props);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetOutputProps(reader, output_number, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(output_props2 != output_props, "Expected different objects.\n");
ret_size = sizeof(mt2_buffer);
hr = IWMOutputMediaProps_GetMediaType(output_props2, mt2, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
winetest_pop_context();
}
hr = IWMSyncReader_GetOutputFormat(reader, output_number, count, &output_props);
- ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetOutputProps(reader, output_number, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_GetOutputProps(reader, output_number, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(output_props2 != output_props, "Expected different objects.\n");
ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
winetest_pop_context();
}
@@ -1354,27 +1354,27 @@ static void test_sync_reader_types(void)
count = 0xdeadbeef;
hr = IWMSyncReader_GetOutputFormatCount(reader, 2, &count);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
- ok(count == 0xdeadbeef, "Got count %#x.\n", count);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
+ ok(count == 0xdeadbeef, "Got count %#lx.\n", count);
output_props = (void *)0xdeadbeef;
hr = IWMSyncReader_GetOutputProps(reader, 2, &output_props);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
output_props = (void *)0xdeadbeef;
hr = IWMSyncReader_GetOutputFormat(reader, 2, 0, &output_props);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
IWMProfile_Release(profile);
ref = IWMSyncReader_Release(reader);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
- ok(stream.refcount == 1, "Got outstanding refcount %d.\n", stream.refcount);
+ ok(stream.refcount == 1, "Got outstanding refcount %ld.\n", stream.refcount);
CloseHandle(stream.file);
ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
}
static void test_sync_reader_file(void)
@@ -1388,32 +1388,32 @@ static void test_sync_reader_file(void)
BOOL ret;
hr = WMCreateSyncReader(NULL, 0, &reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IWMSyncReader_QueryInterface(reader, &IID_IWMProfile, (void **)&profile);
hr = IWMSyncReader_Open(reader, filename);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
count = 0xdeadbeef;
hr = IWMSyncReader_GetOutputCount(reader, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 2, "Got count %lu.\n", count);
hr = IWMSyncReader_Close(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_Close(reader);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
hr = IWMSyncReader_Open(reader, filename);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IWMProfile_Release(profile);
ref = IWMSyncReader_Release(reader);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
}
struct callback
@@ -1444,7 +1444,7 @@ static HRESULT WINAPI callback_QueryInterface(IWMReaderCallback *iface, REFIID i
struct callback *callback = impl_from_IWMReaderCallback(iface);
if (winetest_debug > 1)
- trace("%04x: IWMReaderCallback::QueryInterface(%s)\n", GetCurrentThreadId(), debugstr_guid(iid));
+ trace("%04lx: IWMReaderCallback::QueryInterface(%s)\n", GetCurrentThreadId(), debugstr_guid(iid));
if (IsEqualGUID(iid, &IID_IWMReaderAllocatorEx))
*out = &callback->IWMReaderAllocatorEx_iface;
@@ -1482,21 +1482,21 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta
struct callback *callback = impl_from_IWMReaderCallback(iface);
if (winetest_debug > 1)
- trace("%u: %04x: IWMReaderCallback::OnStatus(status %u, hr %#x, type %#x, value %p)\n",
+ trace("%lu: %04lx: IWMReaderCallback::OnStatus(status %u, hr %#lx, type %#x, value %p)\n",
GetTickCount(), GetCurrentThreadId(), status, hr, type, value);
switch (status)
{
case WMT_OPENED:
ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type);
- ok(!*(DWORD *)value, "Got value %#x.\n", *(DWORD *)value);
+ ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xdeadbeef, "Got unexpected context %p.\n", context);
SetEvent(callback->got_opened);
break;
case WMT_STARTED:
ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type);
- ok(!*(DWORD *)value, "Got value %#x.\n", *(DWORD *)value);
+ ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
callback->got_end_of_streaming = callback->got_eof = callback->got_sample = 0;
++callback->got_started;
@@ -1504,21 +1504,21 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta
case WMT_STOPPED:
ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type);
- ok(!*(DWORD *)value, "Got value %#x.\n", *(DWORD *)value);
+ ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
SetEvent(callback->got_stopped);
break;
case WMT_CLOSED:
ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type);
- ok(!*(DWORD *)value, "Got value %#x.\n", *(DWORD *)value);
+ ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
++callback->got_closed;
break;
case WMT_END_OF_STREAMING:
ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type);
- ok(!*(DWORD *)value, "Got value %#x.\n", *(DWORD *)value);
+ ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
ok(!callback->got_eof, "Got %u WMT_EOF callbacks.\n", callback->got_eof);
++callback->got_end_of_streaming;
@@ -1526,7 +1526,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta
case WMT_EOF:
ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type);
- ok(!*(DWORD *)value, "Got value %#x.\n", *(DWORD *)value);
+ ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
if (callback->all_streams_off)
ok(callback->got_sample == 0, "Got %u samples.\n", callback->got_sample);
@@ -1541,7 +1541,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta
/* Not sent when not using IWMReaderAdvanced::DeliverTime(). */
case WMT_END_OF_SEGMENT:
ok(type == WMT_TYPE_QWORD, "Got type %#x.\n", type);
- ok(*(QWORD *)value == 3000, "Got value %#x.\n", *(DWORD *)value);
+ ok(*(QWORD *)value == 3000, "Got value %#lx.\n", *(DWORD *)value);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
if (callback->all_streams_off)
ok(callback->got_sample == 0, "Got %u samples.\n", callback->got_sample);
@@ -1554,7 +1554,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta
ok(0, "Unexpected status %#x.\n", status);
}
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
return S_OK;
}
@@ -1569,33 +1569,33 @@ static void check_async_sample(struct callback *callback, INSSBuffer *sample)
struct buffer *buffer = impl_from_INSSBuffer(sample);
ok(sample->lpVtbl == &buffer_vtbl, "Buffer vtbl didn't match.\n");
- ok(buffer->size > 0 && buffer->size <= buffer->capacity, "Got size %d.\n", buffer->size);
+ ok(buffer->size > 0 && buffer->size <= buffer->capacity, "Got size %ld.\n", buffer->size);
}
else
{
ok(sample->lpVtbl != &buffer_vtbl, "Buffer vtbl shouldn't match.\n");
hr = INSSBuffer_GetBufferAndLength(sample, &data, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = INSSBuffer_GetBuffer(sample, &data2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(data2 == data, "Data pointers didn't match.\n");
hr = INSSBuffer_GetMaxLength(sample, &capacity);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(size <= capacity, "Size %u exceeds capacity %u.\n", size, capacity);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size <= capacity, "Size %lu exceeds capacity %lu.\n", size, capacity);
hr = INSSBuffer_SetLength(sample, capacity + 1);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = INSSBuffer_SetLength(sample, capacity - 1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = INSSBuffer_GetBufferAndLength(sample, &data2, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(data2 == data, "Data pointers didn't match.\n");
- ok(size == capacity - 1, "Expected size %u, got %u.\n", capacity - 1, size);
+ ok(size == capacity - 1, "Expected size %lu, got %lu.\n", capacity - 1, size);
}
}
@@ -1605,7 +1605,7 @@ static HRESULT WINAPI callback_OnSample(IWMReaderCallback *iface, DWORD output,
struct callback *callback = impl_from_IWMReaderCallback(iface);
if (winetest_debug > 1)
- trace("%u: %04x: IWMReaderCallback::OnSample(output %u, time %I64u, duration %I64u, flags %#x)\n",
+ trace("%lu: %04lx: IWMReaderCallback::OnSample(output %lu, time %I64u, duration %I64u, flags %#lx)\n",
GetTickCount(), GetCurrentThreadId(), output, time, duration, flags);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
@@ -1658,7 +1658,7 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced
struct callback *callback = impl_from_IWMReaderCallbackAdvanced(iface);
if (winetest_debug > 1)
- trace("%u: %04x: IWMReaderCallbackAdvanced::OnStreamSample(stream %u, pts %I64u, duration %I64u, flags %#x)\n",
+ trace("%lu: %04lx: IWMReaderCallbackAdvanced::OnStreamSample(stream %u, pts %I64u, duration %I64u, flags %#lx)\n",
GetTickCount(), GetCurrentThreadId(), stream_number, pts, duration, flags);
ok(context == (void *)0xfacade, "Got unexpected context %p.\n", context);
@@ -1678,7 +1678,7 @@ static HRESULT WINAPI callback_advanced_OnTime(IWMReaderCallbackAdvanced *iface,
struct callback *callback = impl_from_IWMReaderCallbackAdvanced(iface);
if (winetest_debug > 1)
- trace("%u: %04x: IWMReaderCallbackAdvanced::OnTime(time %I64u)\n",
+ trace("%lu: %04lx: IWMReaderCallbackAdvanced::OnTime(time %I64u)\n",
GetTickCount(), GetCurrentThreadId(), time);
ok(time == callback->expect_ontime, "Got time %I64u.\n", time);
@@ -1709,13 +1709,13 @@ static HRESULT WINAPI callback_advanced_AllocateForStream(IWMReaderCallbackAdvan
struct buffer *object;
if (winetest_debug > 1)
- trace("%u: %04x: IWMReaderCallbackAdvanced::AllocateForStream(output %u, size %u)\n",
+ trace("%lu: %04lx: IWMReaderCallbackAdvanced::AllocateForStream(output %u, size %lu)\n",
GetTickCount(), GetCurrentThreadId(), stream_number, size);
ok(callback->read_compressed, "AllocateForStream() should only be called when reading compressed samples.\n");
ok(callback->allocated_samples, "AllocateForStream() should only be called when using a custom allocator.\n");
- ok(size <= max_size, "Got size %u, max stream sample size %u.\n", size, max_size);
+ ok(size <= max_size, "Got size %lu, max stream sample size %lu.\n", size, max_size);
if (!(object = malloc(offsetof(struct buffer, data[size]))))
return E_OUTOFMEMORY;
@@ -1742,7 +1742,7 @@ static HRESULT WINAPI callback_advanced_AllocateForOutput(IWMReaderCallbackAdvan
struct buffer *object;
if (winetest_debug > 1)
- trace("%u: %04x: IWMReaderCallbackAdvanced::AllocateForOutput(output %u, size %u)\n",
+ trace("%lu: %04lx: IWMReaderCallbackAdvanced::AllocateForOutput(output %lu, size %lu)\n",
GetTickCount(), GetCurrentThreadId(), output, size);
if (!callback->read_compressed)
@@ -1866,23 +1866,23 @@ static void run_async_reader(IWMReader *reader, IWMReaderAdvanced2 *advanced, st
callback->got_eof = 0;
hr = IWMReader_Start(reader, 0, 0, 1.0f, (void *)0xfacade);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetUserProvidedClock(advanced, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback->eof_event, 1000);
ok(!ret, "Wait timed out.\n");
ok(callback->got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback->got_eof);
hr = IWMReader_Stop(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback->got_stopped, 1000);
ok(!ret, "Wait timed out.\n");
- ok(!outstanding_buffers, "Got %d outstanding buffers.\n", outstanding_buffers);
+ ok(!outstanding_buffers, "Got %ld outstanding buffers.\n", outstanding_buffers);
}
static void test_async_reader_allocate(IWMReader *reader,
@@ -1894,51 +1894,51 @@ static void test_async_reader_allocate(IWMReader *reader,
callback->allocated_samples = true;
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 0, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 1, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 2, &allocate);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 0, &allocate);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 1, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 2, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 3, &allocate);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 0, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 2, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 0, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(allocate == TRUE, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 1, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(allocate == TRUE, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 1, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 2, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
@@ -1947,43 +1947,43 @@ static void test_async_reader_allocate(IWMReader *reader,
callback->allocated_samples = false;
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 0, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 0, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 2, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 3, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 0, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForOutput(advanced, 1, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(!allocate, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 1, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(allocate == TRUE, "Got allocate %d.\n", allocate);
hr = IWMReaderAdvanced2_GetAllocateForStream(advanced, 2, &allocate);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK)
ok(allocate == TRUE, "Got allocate %d.\n", allocate);
run_async_reader(reader, advanced, callback);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 2, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
static void test_async_reader_selection(IWMReader *reader,
@@ -1995,51 +1995,51 @@ static void test_async_reader_selection(IWMReader *reader,
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 0, &selections[0]);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(selections[0] == 0xdeadbeef, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 1, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 2, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 3, &selections[0]);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(selections[0] == 0xdeadbeef, "Got selection %#x.\n", selections[0]);
hr = IWMReaderAdvanced2_SetStreamsSelected(advanced, 0, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
stream_numbers[0] = 1;
stream_numbers[1] = 0;
selections[0] = selections[1] = WMT_OFF;
hr = IWMReaderAdvanced2_SetStreamsSelected(advanced, 2, stream_numbers, selections);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 1, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
stream_numbers[0] = stream_numbers[1] = 1;
selections[0] = selections[1] = WMT_OFF;
hr = IWMReaderAdvanced2_SetStreamsSelected(advanced, 2, stream_numbers, selections);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 1, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_OFF, "Got selection %#x.\n", selections[0]);
selections[0] = 0xdeadbeef;
hr = IWMReaderAdvanced2_GetStreamSelected(advanced, 2, &selections[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(selections[0] == WMT_ON, "Got selection %#x.\n", selections[0]);
run_async_reader(reader, advanced, callback);
@@ -2047,7 +2047,7 @@ static void test_async_reader_selection(IWMReader *reader,
stream_numbers[0] = stream_numbers[1] = 2;
selections[0] = selections[1] = WMT_OFF;
hr = IWMReaderAdvanced2_SetStreamsSelected(advanced, 2, stream_numbers, selections);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
callback->all_streams_off = true;
run_async_reader(reader, advanced, callback);
@@ -2057,7 +2057,7 @@ static void test_async_reader_selection(IWMReader *reader,
stream_numbers[1] = 2;
selections[0] = selections[1] = WMT_ON;
hr = IWMReaderAdvanced2_SetStreamsSelected(advanced, 2, stream_numbers, selections);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
static void test_async_reader_compressed(IWMReader *reader,
@@ -2066,33 +2066,33 @@ static void test_async_reader_compressed(IWMReader *reader,
HRESULT hr;
hr = IWMReaderAdvanced2_GetMaxStreamSampleSize(advanced, 0, &callback->max_stream_sample_size[0]);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_GetMaxStreamSampleSize(advanced, 3, &callback->max_stream_sample_size[0]);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_GetMaxStreamSampleSize(advanced, 1, &callback->max_stream_sample_size[0]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(callback->max_stream_sample_size[0] > 0, "Expected nonzero size.\n");
hr = IWMReaderAdvanced2_GetMaxStreamSampleSize(advanced, 2, &callback->max_stream_sample_size[1]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(callback->max_stream_sample_size[1] > 0, "Expected nonzero size.\n");
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 0, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 3, TRUE);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 2, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
callback->read_compressed = true;
run_async_reader(reader, advanced, callback);
callback->read_compressed = false;
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 2, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
static void test_async_reader_allocate_compressed(IWMReader *reader,
@@ -2103,42 +2103,42 @@ static void test_async_reader_allocate_compressed(IWMReader *reader,
callback->read_compressed = true;
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 2, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
callback->allocated_samples = true;
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 2, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
run_async_reader(reader, advanced, callback);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForStream(advanced, 2, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 0, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 1, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
callback->allocated_samples = false;
run_async_reader(reader, advanced, callback);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 0, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetAllocateForOutput(advanced, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 1, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetReceiveStreamSamples(advanced, 2, FALSE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
callback->read_compressed = false;
}
@@ -2159,68 +2159,68 @@ static void test_async_reader_streaming(void)
BOOL ret;
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", debugstr_w(file), GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %lu.\n", debugstr_w(file), GetLastError());
teststream_init(&stream, file);
callback_init(&callback);
hr = WMCreateReader(NULL, 0, &reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IWMReader_QueryInterface(reader, &IID_IWMProfile, (void **)&profile);
IWMReader_QueryInterface(reader, &IID_IWMReaderAdvanced2, (void **)&advanced);
hr = IWMReader_Stop(reader);
- ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr);
+ ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_OpenStream(advanced, &stream.IStream_iface, &callback.IWMReaderCallback_iface, (void **)0xdeadbeef);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(stream.refcount > 1, "Got refcount %d.\n", stream.refcount);
- ok(callback.refcount > 1, "Got refcount %d.\n", callback.refcount);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(stream.refcount > 1, "Got refcount %ld.\n", stream.refcount);
+ ok(callback.refcount > 1, "Got refcount %ld.\n", callback.refcount);
ret = WaitForSingleObject(callback.got_opened, 1000);
ok(!ret, "Wait timed out.\n");
count = 0xdeadbeef;
hr = IWMReader_GetOutputCount(reader, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 2, "Got count %lu.\n", count);
for (i = 0; i < 2; ++i)
{
hr = IWMProfile_GetStream(profile, i, &config);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
stream_numbers[i] = 0xdead;
hr = IWMStreamConfig_GetStreamNumber(config, &stream_numbers[i]);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(stream_numbers[i] == i + 1, "Got stream number %u.\n", stream_numbers[i]);
ref = IWMStreamConfig_Release(config);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
hr = IWMReader_Start(reader, 0, 0, 1.0f, (void *)0xfacade);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* By default the reader will time itself, and attempt to deliver samples
* according to their presentation time. Call DeliverTime with the file
* duration in order to request all samples as fast as possible. */
hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000);
- ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr);
+ ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_SetUserProvidedClock(advanced, TRUE);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
callback.expect_ontime = 0;
hr = IWMReaderAdvanced2_DeliverTime(advanced, 0);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback.ontime_event, 1000);
ok(!ret, "Wait timed out.\n");
callback.expect_ontime = 1000 * 10000;
hr = IWMReaderAdvanced2_DeliverTime(advanced, 1000 * 10000);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback.ontime_event, 1000);
ok(!ret, "Wait timed out.\n");
callback.expect_ontime = 3000 * 10000;
hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback.ontime_event, 1000);
ok(!ret, "Wait timed out.\n");
@@ -2229,22 +2229,22 @@ static void test_async_reader_streaming(void)
ok(callback.got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback.got_eof);
hr = IWMReader_Start(reader, 0, 0, 1.0f, (void *)0xfacade);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback.eof_event, 1000);
ok(!ret, "Wait timed out.\n");
ok(callback.got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback.got_eof);
hr = IWMReader_Stop(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback.got_stopped, 1000);
ok(!ret, "Wait timed out.\n");
hr = IWMReader_Stop(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = WaitForSingleObject(callback.got_stopped, 1000);
ok(!ret, "Wait timed out.\n");
@@ -2255,26 +2255,26 @@ static void test_async_reader_streaming(void)
test_async_reader_allocate_compressed(reader, advanced, &callback);
hr = IWMReader_Close(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(callback.got_closed == 1, "Got %u WMT_CLOSED callbacks.\n", callback.got_closed);
- ok(callback.refcount == 1, "Got outstanding refcount %d.\n", callback.refcount);
+ ok(callback.refcount == 1, "Got outstanding refcount %ld.\n", callback.refcount);
callback_cleanup(&callback);
hr = IWMReader_Stop(reader);
- ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr);
+ ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
- ok(stream.refcount == 1, "Got outstanding refcount %d.\n", stream.refcount);
+ ok(stream.refcount == 1, "Got outstanding refcount %ld.\n", stream.refcount);
CloseHandle(stream.file);
ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
hr = IWMReader_Close(reader);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
IWMReaderAdvanced2_Release(advanced);
IWMProfile_Release(profile);
ref = IWMReader_Release(reader);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_async_reader_types(void)
@@ -2299,32 +2299,32 @@ static void test_async_reader_types(void)
BOOL ret;
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", debugstr_w(file), GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %lu.\n", debugstr_w(file), GetLastError());
teststream_init(&stream, file);
callback_init(&callback);
hr = WMCreateReader(NULL, 0, &reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IWMReader_QueryInterface(reader, &IID_IWMProfile, (void **)&profile);
IWMReader_QueryInterface(reader, &IID_IWMReaderAdvanced2, (void **)&advanced);
hr = IWMReaderAdvanced2_OpenStream(advanced, &stream.IStream_iface, &callback.IWMReaderCallback_iface, (void **)0xdeadbeef);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(stream.refcount > 1, "Got refcount %d.\n", stream.refcount);
- ok(callback.refcount > 1, "Got refcount %d.\n", callback.refcount);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(stream.refcount > 1, "Got refcount %ld.\n", stream.refcount);
+ ok(callback.refcount > 1, "Got refcount %ld.\n", callback.refcount);
ret = WaitForSingleObject(callback.got_opened, 1000);
ok(!ret, "Wait timed out.\n");
for (i = 0; i < 2; ++i)
{
- winetest_push_context("Stream %u", i);
+ winetest_push_context("Stream %lu", i);
hr = IWMProfile_GetStream(profile, i, &config);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMStreamConfig_GetStreamType(config, &majortype);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (!i)
ok(IsEqualGUID(&majortype, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&majortype));
else
@@ -2333,32 +2333,32 @@ static void test_async_reader_types(void)
test_stream_media_props(config, &majortype);
ref = IWMStreamConfig_Release(config);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
winetest_pop_context();
}
for (i = 0; i < 2; ++i)
{
- winetest_push_context("Output %u", i);
+ winetest_push_context("Output %lu", i);
output_number = i;
hr = IWMReader_GetOutputProps(reader, output_number, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret_size = sizeof(mt_buffer);
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
majortype = mt->majortype;
memset(&majortype2, 0xcc, sizeof(majortype2));
hr = IWMOutputMediaProps_GetType(output_props, &majortype2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(IsEqualGUID(&majortype2, &majortype), "Expected major type %s, got %s.\n",
debugstr_guid(&majortype), debugstr_guid(&majortype2));
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
if (IsEqualGUID(&majortype, &MEDIATYPE_Audio))
{
@@ -2372,14 +2372,14 @@ static void test_async_reader_types(void)
* with. In particular it has to be PCM. */
hr = IWMReader_GetOutputFormat(reader, output_number, 0, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret_size = sizeof(mt2_buffer);
hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* The sample size might differ. */
mt2->lSampleSize = mt->lSampleSize;
@@ -2396,38 +2396,38 @@ static void test_async_reader_types(void)
count = 0;
hr = IWMReader_GetOutputFormatCount(reader, output_number, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count > 0, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count > 0, "Got count %lu.\n", count);
for (j = 0; j < count; ++j)
{
- winetest_push_context("Format %u", j);
+ winetest_push_context("Format %lu", j);
hr = IWMReader_GetOutputFormat(reader, output_number, j, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReader_GetOutputFormat(reader, output_number, j, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(output_props2 != output_props, "Expected different objects.\n");
ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
size = 0xdeadbeef;
hr = IWMOutputMediaProps_GetMediaType(output_props, NULL, &size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(size != 0xdeadbeef && size >= sizeof(WM_MEDIA_TYPE), "Got size %u.\n", size);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size != 0xdeadbeef && size >= sizeof(WM_MEDIA_TYPE), "Got size %lu.\n", size);
ret_size = size - 1;
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
- ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#x.\n", hr);
- ok(ret_size == size, "Expected size %u, got %u.\n", size, ret_size);
+ ok(hr == ASF_E_BUFFERTOOSMALL, "Got hr %#lx.\n", hr);
+ ok(ret_size == size, "Expected size %lu, got %lu.\n", size, ret_size);
ret_size = sizeof(mt_buffer);
memset(mt_buffer, 0xcc, sizeof(mt_buffer));
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(ret_size == size, "Expected size %u, got %u.\n", size, ret_size);
- ok(size == sizeof(WM_MEDIA_TYPE) + mt->cbFormat, "Expected size %u, got %u.\n",
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(ret_size == size, "Expected size %lu, got %lu.\n", size, ret_size);
+ ok(size == sizeof(WM_MEDIA_TYPE) + mt->cbFormat, "Expected size %Iu, got %lu.\n",
sizeof(WM_MEDIA_TYPE) + mt->cbFormat, size);
ok(IsEqualGUID(&mt->majortype, &majortype), "Got major type %s.\n", debugstr_guid(&mt->majortype));
@@ -2439,52 +2439,52 @@ static void test_async_reader_types(void)
memset(&majortype2, 0xcc, sizeof(majortype2));
hr = IWMOutputMediaProps_GetType(output_props, &majortype2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(IsEqualGUID(&majortype2, &majortype), "Expected major type %s, got %s.\n",
debugstr_guid(&majortype), debugstr_guid(&majortype2));
hr = IWMReader_SetOutputProps(reader, output_number, output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReader_SetOutputProps(reader, 1 - output_number, output_props);
if (!i)
ok(hr == NS_E_INCOMPATIBLE_FORMAT /* win < 8, win10 1507-1809 */
- || hr == ASF_E_BADMEDIATYPE /* win8, win10 1909+ */, "Got hr %#x.\n", hr);
+ || hr == ASF_E_BADMEDIATYPE /* win8, win10 1909+ */, "Got hr %#lx.\n", hr);
else
- todo_wine ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
hr = IWMReader_SetOutputProps(reader, 2, output_props);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(output_props2 != output_props, "Expected different objects.\n");
ret_size = sizeof(mt2_buffer);
hr = IWMOutputMediaProps_GetMediaType(output_props2, mt2, &ret_size);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
winetest_pop_context();
}
hr = IWMReader_GetOutputFormat(reader, output_number, count, &output_props);
- ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#lx.\n", hr);
hr = IWMReader_GetOutputProps(reader, output_number, &output_props);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(output_props2 != output_props, "Expected different objects.\n");
ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
winetest_pop_context();
}
@@ -2494,28 +2494,28 @@ static void test_async_reader_types(void)
count = 0xdeadbeef;
hr = IWMReader_GetOutputFormatCount(reader, 2, &count);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
- ok(count == 0xdeadbeef, "Got count %#x.\n", count);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
+ ok(count == 0xdeadbeef, "Got count %#lx.\n", count);
output_props = (void *)0xdeadbeef;
hr = IWMReader_GetOutputProps(reader, 2, &output_props);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
output_props = (void *)0xdeadbeef;
hr = IWMReader_GetOutputFormat(reader, 2, 0, &output_props);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
IWMReaderAdvanced2_Release(advanced);
IWMProfile_Release(profile);
ref = IWMReader_Release(reader);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
- ok(stream.refcount == 1, "Got outstanding refcount %d.\n", stream.refcount);
+ ok(stream.refcount == 1, "Got outstanding refcount %ld.\n", stream.refcount);
CloseHandle(stream.file);
ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
}
static void test_async_reader_file(void)
@@ -2531,39 +2531,39 @@ static void test_async_reader_file(void)
callback_init(&callback);
hr = WMCreateReader(NULL, 0, &reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReader_Open(reader, filename, &callback.IWMReaderCallback_iface, (void **)0xdeadbeef);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(callback.refcount > 1, "Got refcount %d.\n", callback.refcount);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(callback.refcount > 1, "Got refcount %ld.\n", callback.refcount);
ret = WaitForSingleObject(callback.got_opened, 1000);
ok(!ret, "Wait timed out.\n");
count = 0xdeadbeef;
hr = IWMReader_GetOutputCount(reader, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 2, "Got count %lu.\n", count);
hr = IWMReader_Start(reader, 0, 0, 1.0f, (void *)0xfacade);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWMReader_Close(reader);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(callback.got_closed == 1, "Got %u WMT_CLOSED callbacks.\n", callback.got_closed);
- ok(callback.refcount == 1, "Got outstanding refcount %d.\n", callback.refcount);
+ ok(callback.refcount == 1, "Got outstanding refcount %ld.\n", callback.refcount);
callback_cleanup(&callback);
hr = IWMReader_Close(reader);
- ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr);
+ ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
ref = IWMReader_Release(reader);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ok(callback.got_closed == 1, "Got %u WMT_CLOSED callbacks.\n", callback.got_closed);
- ok(callback.refcount == 1, "Got outstanding refcount %d.\n", callback.refcount);
+ ok(callback.refcount == 1, "Got outstanding refcount %ld.\n", callback.refcount);
callback_cleanup(&callback);
ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
}
START_TEST(wmvcore)
1
0
March 10, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wlanapi/tests/Makefile.in | 1 -
dlls/wlanapi/tests/wlanapi.c | 60 ++++++++++++++++++++--------------------
2 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/dlls/wlanapi/tests/Makefile.in b/dlls/wlanapi/tests/Makefile.in
index 6fede3572c8..a08db320f1f 100644
--- a/dlls/wlanapi/tests/Makefile.in
+++ b/dlls/wlanapi/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wlanapi.dll
IMPORTS = wlanapi
diff --git a/dlls/wlanapi/tests/wlanapi.c b/dlls/wlanapi/tests/wlanapi.c
index 55ac21eee04..5c26e6d8ba0 100644
--- a/dlls/wlanapi/tests/wlanapi.c
+++ b/dlls/wlanapi/tests/wlanapi.c
@@ -35,73 +35,73 @@ static void test_WlanOpenHandle(void)
is_xp = ret == ERROR_SUCCESS;
if (!is_xp) /* the results in XP differ completely from all other versions */
{
- ok(ret == ERROR_NOT_SUPPORTED, "Expected 50, got %d\n", ret);
+ ok(ret == ERROR_NOT_SUPPORTED, "Expected 50, got %ld\n", ret);
ok(neg_version == 0xdeadbeef, "neg_version changed\n");
ok(handle == bad_handle, "handle changed\n");
ret = WlanOpenHandle(10, NULL, &neg_version, &handle);
- ok(ret == ERROR_NOT_SUPPORTED, "Expected 50, got %d\n", ret);
+ ok(ret == ERROR_NOT_SUPPORTED, "Expected 50, got %ld\n", ret);
ok(neg_version == 0xdeadbeef, "neg_version changed\n");
ok(handle == bad_handle, "handle changed\n");
/* reserved parameter must not be used */
ret = WlanOpenHandle(1, &reserved, &neg_version, &handle);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ok(neg_version == 0xdeadbeef, "neg_version changed\n");
ok(handle == bad_handle, "handle changed\n");
/* invalid parameters */
ret = WlanOpenHandle(1, NULL, NULL, &handle);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ok(handle == bad_handle, "bad handle\n");
ret = WlanOpenHandle(1, NULL, &neg_version, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ok(neg_version == 0xdeadbeef, "neg_version changed\n");
}
else
{
- ok(neg_version == 1, "Expected 1, got %d\n", neg_version);
+ ok(neg_version == 1, "Expected 1, got %ld\n", neg_version);
ok(handle != bad_handle && handle, "handle changed\n");
ret = WlanCloseHandle(handle, NULL);
- ok(ret == 0, "Expected 0, got %d\n", ret);
+ ok(ret == 0, "Expected 0, got %ld\n", ret);
}
/* good tests */
ret = WlanOpenHandle(1, NULL, &neg_version, &handle);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
- ok(neg_version == 1, "Expected 1, got %d\n", neg_version);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
+ ok(neg_version == 1, "Expected 1, got %ld\n", neg_version);
ok(handle != bad_handle && handle, "handle changed\n");
ret = WlanCloseHandle(handle, NULL);
- ok(ret == 0, "Expected 0, got %d\n", ret);
+ ok(ret == 0, "Expected 0, got %ld\n", ret);
ret = WlanOpenHandle(2, NULL, &neg_version, &handle);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
if (!is_xp) /* XP does not support client version 2 */
- ok(neg_version == 2, "Expected 2, got %d\n", neg_version);
+ ok(neg_version == 2, "Expected 2, got %ld\n", neg_version);
else
- ok(neg_version == 1, "Expected 1, got %d\n", neg_version);
+ ok(neg_version == 1, "Expected 1, got %ld\n", neg_version);
ok(handle != bad_handle && handle, "bad handle\n");
ret = WlanCloseHandle(handle, NULL);
- ok(ret == 0, "Expected 0, got %d\n", ret);
+ ok(ret == 0, "Expected 0, got %ld\n", ret);
/* open twice */
ret = WlanOpenHandle(1, NULL, &neg_version, &handle);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
ret = WlanOpenHandle(1, NULL, &neg_version, &handle2);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
ret = WlanCloseHandle(handle, &reserved);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ret = WlanCloseHandle(handle, NULL);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
ret = WlanCloseHandle(handle2, NULL);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
ret = WlanCloseHandle(bad_handle, NULL);
- ok(ret == ERROR_INVALID_HANDLE, "Expected 6, got %d\n", ret);
+ ok(ret == ERROR_INVALID_HANDLE, "Expected 6, got %ld\n", ret);
ret = WlanCloseHandle(NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
}
static void test_WlanAllocateFreeMemory(void)
@@ -111,7 +111,7 @@ static void test_WlanAllocateFreeMemory(void)
SetLastError(0xdeadbeef);
ptr = WlanAllocateMemory(0);
ok(ptr == NULL, "Expected NULL, got %p\n", ptr);
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", GetLastError());
ptr = WlanAllocateMemory(1024);
ok(ptr != NULL, "Expected non-NULL\n");
@@ -130,23 +130,23 @@ static void test_WlanEnumInterfaces(void)
WLAN_INTERFACE_INFO *info;
ret = WlanOpenHandle(1, NULL, &neg_version, &handle);
- ok(ret == 0, "Expected 0, got %d\n", ret);
+ ok(ret == 0, "Expected 0, got %ld\n", ret);
/* invalid parameters */
ret = WlanEnumInterfaces(NULL, NULL, &list);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ok(list == bad_list, "list changed\n");
ret = WlanEnumInterfaces(handle, &reserved, &list);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ok(list == bad_list, "list changed\n");
ret = WlanEnumInterfaces(handle, NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %ld\n", ret);
ok(list == bad_list, "list changed\n");
/* good tests */
list = NULL;
ret = WlanEnumInterfaces(handle, NULL, &list);
- ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
+ ok(ret == ERROR_SUCCESS, "Expected 0, got %ld\n", ret);
ok(list != NULL, "bad interface list\n");
if (!list || !list->dwNumberOfItems)
{
@@ -156,11 +156,11 @@ static void test_WlanEnumInterfaces(void)
return;
}
- trace("Wireless interfaces: %d\n", list->dwNumberOfItems);
+ trace("Wireless interfaces: %ld\n", list->dwNumberOfItems);
for (i = 0; i < list->dwNumberOfItems;i ++)
{
info = &list->InterfaceInfo[i];
- trace(" Index[%d] GUID: %s\n", i, wine_dbgstr_guid(&info->InterfaceGuid));
+ trace(" Index[%ld] GUID: %s\n", i, wine_dbgstr_guid(&info->InterfaceGuid));
switch (info->isState)
{
case wlan_interface_state_disconnected:
@@ -179,7 +179,7 @@ static void test_WlanEnumInterfaces(void)
WlanFreeMemory(list);
ret = WlanCloseHandle(handle, NULL);
- ok(ret == 0, "Expected 0, got %d\n", ret);
+ ok(ret == 0, "Expected 0, got %ld\n", ret);
}
START_TEST(wlanapi)
1
0
[PATCH vkd3d v4 2/8] vkd3d-shader/hlsl: Avoid leaks on memory allocation failures when parsing initializers.
by Francisco Casas March 10, 2022
by Francisco Casas March 10, 2022
March 10, 2022
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
v4:
- This patch is new in v4.
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
libs/vkd3d-shader/hlsl.y | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index 92dcb3f2..8c66a33c 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -3211,7 +3211,10 @@ complex_initializer:
{
$$.args_count = 1;
if (!($$.args = hlsl_alloc(ctx, sizeof(*$$.args))))
+ {
+ destroy_instr_list($1);
YYABORT;
+ }
$$.args[0] = node_from_list($1);
$$.instrs = $1;
}
@@ -3240,7 +3243,11 @@ initializer_expr_list:
{
$$ = $1;
if (!($$.args = hlsl_realloc(ctx, $$.args, ($$.args_count + 1) * sizeof(*$$.args))))
+ {
+ free_parse_initializer(&$$);
+ destroy_instr_list($3);
YYABORT;
+ }
$$.args[$$.args_count++] = node_from_list($3);
list_move_tail($$.instrs, $3);
vkd3d_free($3);
--
2.25.1
2
4
Signed-off-by: Santino Mazza <mazzasantino1206(a)gmail.com>
---
dlls/bcrypt/bcrypt_main.c | 6 ++++++
dlls/bcrypt/tests/bcrypt.c | 20 +++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 7353cae26eb..75ee96f56c7 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -701,6 +701,12 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
return STATUS_NOT_IMPLEMENTED;
}
}
+ else if (!wcscmp( prop, BCRYPT_KEY_LENGTH ))
+ {
+ if(size < sizeof(DWORD)) return STATUS_INVALID_PARAMETER;
+ key->u.a.bitlen = *(DWORD*)value;
+ return STATUS_SUCCESS;
+ }
FIXME( "unsupported key property %s\n", debugstr_w(prop) );
return STATUS_NOT_IMPLEMENTED;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 95addc1ab16..9230726969b 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -672,6 +672,7 @@ static void test_BCryptGenerateSymmetricKey(void)
BCRYPT_KEY_LENGTHS_STRUCT key_lengths;
ULONG size, len, i;
NTSTATUS ret;
+ DWORD keylen;
ret = BCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
@@ -706,6 +707,13 @@ static void test_BCryptGenerateSymmetricKey(void)
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ todo_wine
+ {
+ keylen = 512;
+ ret = BCryptSetProperty(aes, BCRYPT_KEY_LENGTH, (UCHAR *)&keylen, sizeof(keylen), 0);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
+ }
+
size = 0;
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
@@ -2005,6 +2013,7 @@ static void test_RSA(void)
ULONG len, size, size2, schemes;
NTSTATUS ret;
BYTE *buf;
+ DWORD keylen;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0);
if (ret)
@@ -2052,12 +2061,21 @@ static void test_RSA(void)
ok(!ret, "BCryptDestroyKey failed: %#lx\n", ret);
/* sign/verify with export/import round-trip */
- ret = BCryptGenerateKeyPair(alg, &key, 512, 0);
+ ret = BCryptGenerateKeyPair(alg, &key, 1024, 0);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+
+ keylen = 512;
+ ret = BCryptSetProperty(key, BCRYPT_KEY_LENGTH, (UCHAR *)&keylen, 2, 0);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
+ ret = BCryptSetProperty(key, BCRYPT_KEY_LENGTH, (UCHAR *)&keylen, sizeof(keylen), 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ret = BCryptSetProperty(key, BCRYPT_KEY_LENGTH, (UCHAR *)&keylen, sizeof(keylen), 0);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
memset(sig, 0, sizeof(sig));
ret = BCryptSignHash(key, &pad, hash, sizeof(hash), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
--
2.32.0
2
7