Wine-Devel
Threads by month
- ----- 2026 -----
- June
- May
- 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
- 7 participants
- 84546 discussions
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/evr/tests/Makefile.in | 1 -
dlls/evr/tests/evr.c | 1291 ++++++++++++++++++------------------
2 files changed, 647 insertions(+), 645 deletions(-)
diff --git a/dlls/evr/tests/Makefile.in b/dlls/evr/tests/Makefile.in
index b8980a3f397..c5db2226ebc 100644
--- a/dlls/evr/tests/Makefile.in
+++ b/dlls/evr/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = evr.dll
IMPORTS = dxva2 mfplat mfuuid mf strmiids uuid dxguid ole32 oleaut32 evr d3d9 user32
diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c
index acbb2b1869a..ea67ff5b584 100644
--- a/dlls/evr/tests/evr.c
+++ b/dlls/evr/tests/evr.c
@@ -80,7 +80,7 @@ static IBaseFilter *create_evr(void)
IBaseFilter *filter = NULL;
HRESULT hr = CoCreateInstance(&CLSID_EnhancedVideoRenderer, NULL, CLSCTX_INPROC_SERVER,
&IID_IBaseFilter, (void **)&filter);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
return filter;
}
@@ -90,7 +90,7 @@ static IFilterGraph2 *create_graph(void)
HRESULT hr;
hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret);
- ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr);
+ ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr);
return ret;
}
@@ -100,7 +100,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
ULONG rc;
IUnknown_AddRef(obj);
rc = IUnknown_Release(obj);
- ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref);
+ ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld.\n", rc, ref);
}
static ULONG get_refcount(void *iface)
@@ -157,69 +157,69 @@ static void test_aggregation(void)
filter = (IBaseFilter *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_EnhancedVideoRenderer, &test_outer, CLSCTX_INPROC_SERVER,
&IID_IBaseFilter, (void **)&filter);
- ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_EnhancedVideoRenderer, &test_outer, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
ref = get_refcount(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2);
IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2);
- ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter);
ref = IUnknown_Release(unk);
- ok(!ref, "Got unexpected refcount %d.\n", ref);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(!ref, "Got unexpected refcount %ld.\n", ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
/* Default presenter. */
presenter = (void *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_MFVideoPresenter9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IMFVideoPresenter,
(void **)&presenter);
- ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok(!presenter, "Got interface %p.\n", presenter);
hr = CoCreateInstance(&CLSID_MFVideoPresenter9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK || broken(hr == E_FAIL) /* WinXP */, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_FAIL) /* WinXP */, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
ref = get_refcount(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
IUnknown_Release(unk);
}
@@ -228,15 +228,15 @@ static void test_aggregation(void)
presenter = (void *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_MFVideoMixer9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IMFTransform,
(void **)&mixer);
- ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok(!mixer, "Got interface %p.\n", mixer);
hr = CoCreateInstance(&CLSID_MFVideoMixer9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
ref = get_refcount(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
IUnknown_Release(unk);
}
@@ -251,7 +251,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
- 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(unk);
}
@@ -266,7 +266,7 @@ static void check_service_interface_(unsigned int line, void *iface_ptr, REFGUID
expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = MFGetService(iface, service, iid, (void **)&unk);
- 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(unk);
}
@@ -295,7 +295,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVideoWindow, FALSE);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got unexpected refcount %d.\n", ref);
+ ok(!ref, "Got unexpected refcount %ld.\n", ref);
}
static void test_enum_pins(void)
@@ -307,85 +307,85 @@ static void test_enum_pins(void)
HRESULT hr;
ref = get_refcount(filter);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL);
- ok(hr == E_POINTER, "Got hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(enum1);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL);
- ok(hr == E_POINTER, "Got hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(pins[0]);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(enum1);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
IPin_Release(pins[0]);
ref = get_refcount(filter);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 1, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 1, "Got count %lu.\n", count);
IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
- ok(!count, "Got count %u.\n", count);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
+ ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
- ok(count == 1, "Got count %u.\n", count);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
+ ok(count == 1, "Got count %lu.\n", count);
IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(pins[0]);
IEnumPins_Release(enum2);
IEnumPins_Release(enum1);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_find_pin(void)
@@ -397,19 +397,19 @@ static void test_find_pin(void)
ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2);
IPin_Release(pin2);
IPin_Release(pin);
IEnumPins_Release(enum_pins);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_pin_info(void)
@@ -423,38 +423,38 @@ static void test_pin_info(void)
IPin *pin;
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(pin);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(pin);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG expected_code, LONG_PTR expected1, LONG_PTR expected2)
@@ -468,14 +468,14 @@ static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG
{
if (code == expected_code)
{
- ok(param1 == expected1, "Got param1 %#lx.\n", param1);
- ok(param2 == expected2, "Got param2 %#lx.\n", param2);
+ ok(param1 == expected1, "Got param1 %#Ix.\n", param1);
+ ok(param2 == expected2, "Got param2 %#Ix.\n", param2);
ret++;
}
IMediaEvent_FreeEventParams(eventsrc, code, param1, param2);
timeout = 0;
}
- ok(hr == E_ABORT, "Got hr %#x.\n", hr);
+ ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret;
}
@@ -496,49 +496,49 @@ static void test_unconnected_eos(void)
ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer");
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
@@ -546,9 +546,9 @@ static void test_unconnected_eos(void)
IMediaControl_Release(control);
IMediaEvent_Release(eventsrc);
ref = IFilterGraph2_Release(graph);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static IMFMediaType * create_video_type(const GUID *subtype)
@@ -557,13 +557,13 @@ static IMFMediaType * create_video_type(const GUID *subtype)
HRESULT hr;
hr = MFCreateMediaType(&video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(video_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(video_type, &MF_MT_SUBTYPE, subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return video_type;
}
@@ -583,17 +583,18 @@ static void test_default_mixer(void)
IMFTransform *transform;
DXVA2_ValueRange range;
DXVA2_Fixed32 dxva_value;
- DWORD flags, value, count;
+ UINT32 count, value;
COLORREF color;
unsigned int i;
DWORD ids[16];
IUnknown *unk;
+ DWORD flags;
GUID *guids;
HRESULT hr;
IID iid;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&transform);
- ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default mixer, hr %#lx.\n", hr);
check_interface(transform, &IID_IMFQualityAdvise, TRUE);
check_interface(transform, &IID_IMFClockStateSink, TRUE);
@@ -612,105 +613,105 @@ static void test_default_mixer(void)
check_service_interface(transform, &MR_VIDEO_MIXER_SERVICE, &IID_IMFTransform, FALSE);
hr = MFGetService((IUnknown *)transform, &MR_VIDEO_RENDER_SERVICE, &IID_IUnknown, (void **)&unk);
- ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(MFGetService((IUnknown *)transform, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixerControl2, (void **)&mixer_control2)))
{
hr = IMFVideoMixerControl2_GetMixingPrefs(mixer_control2, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl2_GetMixingPrefs(mixer_control2, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!flags, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!flags, "Unexpected flags %#lx.\n", flags);
IMFVideoMixerControl2_Release(mixer_control2);
}
hr = MFGetService((IUnknown *)transform, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetBackgroundColor(processor, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
color = 1;
hr = IMFVideoProcessor_GetBackgroundColor(processor, &color);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!color, "Unexpected color %#x.\n", color);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!color, "Unexpected color %#lx.\n", color);
hr = IMFVideoProcessor_SetBackgroundColor(processor, 0x00121212);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetBackgroundColor(processor, &color);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(color == 0x121212, "Unexpected color %#x.\n", color);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(color == 0x121212, "Unexpected color %#lx.\n", color);
hr = IMFVideoProcessor_GetFilteringRange(processor, DXVA2_DetailFilterChromaLevel, &range);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetFilteringValue(processor, DXVA2_DetailFilterChromaLevel, &dxva_value);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetAvailableVideoProcessorModes(processor, &count, &guids);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
IMFVideoProcessor_Release(processor);
hr = IMFTransform_SetOutputBounds(transform, 100, 10);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoDeviceID, (void **)&deviceid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(transform, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(transform, &attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(transform, &attributes2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(attributes == attributes2, "Unexpected attributes instance.\n");
IMFAttributes_Release(attributes2);
hr = IMFTransform_QueryInterface(transform, &IID_IMFAttributes, (void **)&attributes2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(attributes != attributes2, "Unexpected attributes instance.\n");
hr = IMFAttributes_QueryInterface(attributes2, &IID_IMFTransform, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IMFAttributes_GetCount(attributes2, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
value = 0;
hr = IMFAttributes_GetUINT32(attributes2, &MF_SA_D3D_AWARE, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == 1, "Unexpected value %d.\n", value);
IMFAttributes_Release(attributes2);
hr = IMFAttributes_GetCount(attributes, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
memset(&rect, 0, sizeof(rect));
hr = IMFAttributes_GetBlob(attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&rect, sizeof(rect), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rect.left == 0.0f && rect.top == 0.0f && rect.right == 1.0f && rect.bottom == 1.0f,
"Unexpected zoom rect (%f, %f) - (%f, %f).\n", rect.left, rect.top, rect.right, rect.bottom);
IMFAttributes_Release(attributes);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, &iid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualIID(&iid, &IID_IDirect3DDevice9), "Unexpected id %s.\n", wine_dbgstr_guid(&iid));
IMFVideoDeviceID_Release(deviceid);
@@ -718,84 +719,84 @@ static void test_default_mixer(void)
/* Stream configuration. */
input_count = output_count = 0;
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count);
- ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr);
- ok(input_count == 1 && output_count == 1, "Unexpected stream count %u/%u.\n", input_count, output_count);
+ ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr);
+ ok(input_count == 1 && output_count == 1, "Unexpected stream count %lu/%lu.\n", input_count, output_count);
hr = IMFTransform_GetStreamLimits(transform, &input_min, &input_max, &output_min, &output_max);
- ok(hr == S_OK, "Failed to get stream limits, hr %#x.\n", hr);
- ok(input_min == 1 && input_max == 16 && output_min == 1 && output_max == 1, "Unexpected stream limits %u/%u, %u/%u.\n",
+ ok(hr == S_OK, "Failed to get stream limits, hr %#lx.\n", hr);
+ ok(input_min == 1 && input_max == 16 && output_min == 1 && output_max == 1, "Unexpected stream limits %lu/%lu, %lu/%lu.\n",
input_min, input_max, output_min, output_max);
hr = IMFTransform_GetInputStreamInfo(transform, 1, &input_info);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamInfo(transform, 1, &output_info);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
memset(&input_info, 0xcc, sizeof(input_info));
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
memset(&output_info, 0xcc, sizeof(output_info));
hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
ok(!(output_info.dwFlags & (MFT_OUTPUT_STREAM_PROVIDES_SAMPLES | MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES)),
- "Unexpected output flags %#x.\n", output_info.dwFlags);
+ "Unexpected output flags %#lx.\n", output_info.dwFlags);
hr = IMFTransform_GetStreamIDs(transform, 1, &input_id, 1, &output_id);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
ok(input_id == 0 && output_id == 0, "Unexpected stream ids.\n");
hr = IMFTransform_GetInputStreamAttributes(transform, 1, &attributes);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(transform, 1, &attributes);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(transform, 0, &attributes);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_AddInputStreams(transform, 16, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_AddInputStreams(transform, 16, ids);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
memset(ids, 0, sizeof(ids));
hr = IMFTransform_AddInputStreams(transform, 15, ids);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(ids); ++i)
ids[i] = i + 1;
hr = IMFTransform_AddInputStreams(transform, 15, ids);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_count = output_count = 0;
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count);
- ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr);
- ok(input_count == 16 && output_count == 1, "Unexpected stream count %u/%u.\n", input_count, output_count);
+ ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr);
+ ok(input_count == 16 && output_count == 1, "Unexpected stream count %lu/%lu.\n", input_count, output_count);
memset(&input_info, 0, sizeof(input_info));
hr = IMFTransform_GetInputStreamInfo(transform, 1, &input_info);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
ok((input_info.dwFlags & (MFT_INPUT_STREAM_REMOVABLE | MFT_INPUT_STREAM_OPTIONAL)) ==
- (MFT_INPUT_STREAM_REMOVABLE | MFT_INPUT_STREAM_OPTIONAL), "Unexpected flags %#x.\n", input_info.dwFlags);
+ (MFT_INPUT_STREAM_REMOVABLE | MFT_INPUT_STREAM_OPTIONAL), "Unexpected flags %#lx.\n", input_info.dwFlags);
attributes = NULL;
hr = IMFTransform_GetInputStreamAttributes(transform, 0, &attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_GetCount(attributes, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
hr = IMFAttributes_GetUINT32(attributes, &MF_SA_REQUIRED_SAMPLE_COUNT, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
ok(!!attributes, "Unexpected attributes.\n");
attributes2 = NULL;
hr = IMFTransform_GetInputStreamAttributes(transform, 0, &attributes2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(attributes == attributes2, "Unexpected instance.\n");
IMFAttributes_Release(attributes2);
@@ -803,42 +804,43 @@ static void test_default_mixer(void)
attributes = NULL;
hr = IMFTransform_GetInputStreamAttributes(transform, 1, &attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!attributes, "Unexpected attributes.\n");
IMFAttributes_Release(attributes);
hr = IMFTransform_DeleteInputStream(transform, 0);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(transform, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_count = output_count = 0;
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count);
- ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr);
- ok(input_count == 15 && output_count == 1, "Unexpected stream count %u/%u.\n", input_count, output_count);
+ ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr);
+ ok(input_count == 15 && output_count == 1, "Unexpected stream count %lu/%lu.\n", input_count, output_count);
IMFTransform_Release(transform);
hr = MFCreateVideoMixer(NULL, &IID_IMFTransform, &IID_IMFTransform, (void **)&transform);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_MFVideoMixer9, NULL, CLSCTX_INPROC_SERVER, &IID_IMFTransform, (void **)&transform);
- ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default mixer, hr %#lx.\n", hr);
IMFTransform_Release(transform);
}
static void test_surface_sample(void)
{
IDirect3DSurface9 *backbuffer = NULL, *surface;
+ DWORD flags, buffer_count, length;
IMFDesiredSample *desired_sample;
IMFMediaBuffer *buffer, *buffer2;
LONGLONG duration, time1, time2;
IDirect3DSwapChain9 *swapchain;
- DWORD flags, count, length;
IDirect3DDevice9 *device;
IMFSample *sample;
IUnknown *unk;
+ UINT32 count;
HWND window;
HRESULT hr;
BYTE *data;
@@ -851,195 +853,195 @@ static void test_surface_sample(void)
}
hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain);
- ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08x)\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DSwapChain9_GetBackBuffer(swapchain, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
- ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(backbuffer != NULL, "The back buffer is NULL\n");
IDirect3DSwapChain9_Release(swapchain);
hr = MFCreateVideoSampleFromSurface(NULL, &sample);
- ok(hr == S_OK, "Failed to create surface sample, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create surface sample, hr %#lx.\n", hr);
IMFSample_Release(sample);
hr = MFCreateVideoSampleFromSurface((IUnknown *)backbuffer, &sample);
- ok(hr == S_OK, "Failed to create surface sample, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create surface sample, hr %#lx.\n", hr);
hr = IMFSample_QueryInterface(sample, &IID_IMFTrackedSample, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IMFSample_QueryInterface(sample, &IID_IMFDesiredSample, (void **)&desired_sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, NULL, &time2);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#lx.\n", hr);
IMFDesiredSample_SetDesiredSampleTimeAndDuration(desired_sample, 123, 456);
time1 = time2 = 0;
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(time1 == 123 && time2 == 456, "Unexpected time values.\n");
IMFDesiredSample_SetDesiredSampleTimeAndDuration(desired_sample, 0, 0);
time1 = time2 = 1;
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(time1 == 0 && time2 == 0, "Unexpected time values.\n");
IMFDesiredSample_Clear(desired_sample);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
/* Attributes are cleared. */
hr = IMFSample_SetUnknown(sample, &MFSampleExtension_Token, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
hr = IMFSample_SetSampleTime(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample, &time1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleDuration(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample, &duration);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(sample, 0x1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFDesiredSample_Clear(desired_sample);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
hr = IMFSample_GetSampleTime(sample, &time1);
- ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample, &duration);
- ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleFlags(sample, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(flags == 0, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!flags, "Unexpected flags %#lx.\n", flags);
IMFDesiredSample_Release(desired_sample);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count.\n");
- count = 0;
- hr = IMFSample_GetBufferCount(sample, &count);
- ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
- ok(count == 1, "Unexpected attribute count.\n");
+ buffer_count = 0;
+ hr = IMFSample_GetBufferCount(sample, &buffer_count);
+ ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr);
+ ok(buffer_count == 1, "Unexpected attribute count.\n");
hr = IMFSample_GetTotalLength(sample, &length);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
- ok(!length, "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
hr = IMFSample_GetSampleDuration(sample, &duration);
- ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample, &duration);
- ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetMaxLength(buffer, &length);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
- ok(!length, "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 16);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
- ok(length == 16, "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
+ ok(length == 16, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&unk);
- ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- hr = IMFSample_GetBufferCount(sample, &count);
- ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
- ok(count == 2, "Unexpected attribute count.\n");
+ hr = IMFSample_GetBufferCount(sample, &buffer_count);
+ ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr);
+ ok(buffer_count == 2, "Unexpected buffer count.\n");
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer2);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_CopyToBuffer(sample, buffer);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_RemoveAllBuffers(sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- hr = IMFSample_GetBufferCount(sample, &count);
- ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
- ok(!count, "Unexpected attribute count.\n");
+ hr = IMFSample_GetBufferCount(sample, &buffer_count);
+ ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr);
+ ok(!buffer_count, "Unexpected buffer count.\n");
hr = MFGetService((IUnknown *)buffer, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, (void **)&surface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(surface == backbuffer, "Unexpected instance.\n");
IDirect3DSurface9_Release(surface);
hr = MFGetService((IUnknown *)buffer, &MR_BUFFER_SERVICE, &IID_IUnknown, (void **)&surface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(surface == backbuffer, "Unexpected instance.\n");
IDirect3DSurface9_Release(surface);
IMFMediaBuffer_Release(buffer);
hr = IMFSample_GetSampleFlags(sample, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(sample, 0x123);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
flags = 0;
hr = IMFSample_GetSampleFlags(sample, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(flags == 0x123, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(flags == 0x123, "Unexpected flags %#lx.\n", flags);
IMFSample_Release(sample);
@@ -1060,38 +1062,38 @@ static void test_default_mixer_type_negotiation(void)
IMFMediaType *video_type;
IMFTransform *transform;
MFVideoArea aperture;
- DWORD index, count;
+ UINT count, token;
IUnknown *unk;
+ DWORD index;
HWND window;
HRESULT hr;
- UINT token;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&transform);
- ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default mixer, hr %#lx.\n", hr);
hr = IMFTransform_GetInputAvailableType(transform, 0, 0, &media_type);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type);
- ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
- ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32);
- ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
- ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
/* Now try with device manager. */
@@ -1103,69 +1105,69 @@ static void test_default_mixer_type_negotiation(void)
}
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(transform, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Now manager is not initialized. */
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
- ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* And now type description is incomplete. */
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type);
video_type = create_video_type(&MFVideoFormat_RGB32);
/* Partially initialized type. */
hr = IMFTransform_SetInputType(transform, 0, video_type, 0);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
/* Only required data - frame size and uncompressed marker. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
memset(&aperture, 0, sizeof(aperture));
aperture.Area.cx = 100; aperture.Area.cy = 200;
hr = IMFMediaType_SetBlob(video_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)&aperture, sizeof(aperture));
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_FIXED_SIZE_SAMPLES, 2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, video_type, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == video_type, "Unexpected media type instance.\n");
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == media_type2, "Unexpected media type instance.\n");
IMFMediaType_Release(media_type);
IMFMediaType_Release(media_type2);
/* Modified after type was set. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_PIXEL_ASPECT_RATIO, (UINT64)56 << 32 | 55);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Check attributes on available output types. */
index = 0;
@@ -1177,30 +1179,30 @@ static void test_default_mixer_type_negotiation(void)
UINT32 value;
hr = IMFMediaType_GetGUID(media_type, &MF_MT_MAJOR_TYPE, &major);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualGUID(&major, &MFMediaType_Video), "Unexpected major type.\n");
hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &frame_size);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(frame_size == ((UINT64)100 << 32 | 200), "Unexpected frame size %s.\n", wine_dbgstr_longlong(frame_size));
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_INTERLACE_MODE, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == MFVideoInterlace_Progressive, "Unexpected interlace mode.\n");
/* Ratio from input type */
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_PIXEL_ASPECT_RATIO, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ratio == ((UINT64)1 << 32 | 1), "Unexpected PAR %s.\n", wine_dbgstr_longlong(ratio));
hr = IMFMediaType_GetBlob(media_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)&aperture, sizeof(aperture), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(aperture.Area.cx == 100 && aperture.Area.cy == 200, "Unexpected aperture area.\n");
hr = IMFMediaType_GetBlob(media_type, &MF_MT_MINIMUM_DISPLAY_APERTURE, (UINT8 *)&aperture, sizeof(aperture), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(aperture.Area.cx == 100 && aperture.Area.cy == 200, "Unexpected aperture area.\n");
hr = IMFMediaType_GetUINT32(video_type, &MF_MT_FIXED_SIZE_SAMPLES, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == 2, "Unexpected value %u.\n", value);
IMFMediaType_Release(media_type);
@@ -1208,10 +1210,10 @@ static void test_default_mixer_type_negotiation(void)
ok(index > 1, "Unexpected number of available types.\n");
hr = IMFMediaType_DeleteItem(video_type, &MF_MT_FIXED_SIZE_SAMPLES);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
index = 0;
while (SUCCEEDED(IMFTransform_GetOutputAvailableType(transform, 0, index++, &media_type)))
@@ -1220,11 +1222,11 @@ static void test_default_mixer_type_negotiation(void)
UINT64 ratio;
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_PIXEL_ASPECT_RATIO, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ratio == ((UINT64)56 << 32 | 55), "Unexpected PAR %s.\n", wine_dbgstr_longlong(ratio));
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_FIXED_SIZE_SAMPLES, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == 1, "Unexpected value %u.\n", value);
IMFMediaType_Release(media_type);
@@ -1233,97 +1235,97 @@ static void test_default_mixer_type_negotiation(void)
/* Cloned type is returned. */
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type != media_type2, "Unexpected media type instance.\n");
IMFMediaType_Release(media_type);
IMFMediaType_Release(media_type2);
/* Minimal valid attribute set for output type. */
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_SUBTYPE, &subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 1, NULL, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, NULL, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type2, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(media_type2, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type2, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Candidate type have frame size set, mismatching size is accepted. */
hr = IMFMediaType_SetUINT64(media_type2, &MF_MT_FRAME_SIZE, (UINT64)64 << 32 | 64);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type2, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type2);
IMFMediaType_Release(media_type);
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorMode(processor, &guid);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorCaps(processor, (GUID *)&DXVA2_VideoProcSoftwareDevice, &caps);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == video_type, "Unexpected pointer.\n");
hr = IMFMediaType_QueryInterface(media_type, &IID_IMFVideoMediaType, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
IMFMediaType_Release(media_type);
hr = IMFVideoProcessor_GetAvailableVideoProcessorModes(processor, &count, &guids);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 1, media_type, 0);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorMode(processor, &guid);
todo_wine
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetAvailableVideoProcessorModes(processor, &count, &guids);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
CoTaskMemFree(guids);
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == media_type2, "Unexpected media type instance.\n");
IMFMediaType_Release(media_type2);
IMFMediaType_Release(media_type);
@@ -1356,10 +1358,10 @@ static void test_default_presenter(void)
GUID iid;
hr = MFCreateVideoPresenter(NULL, &IID_IMFVideoPresenter, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
check_interface(presenter, &IID_IQualProp, TRUE);
check_interface(presenter, &IID_IMFVideoPositionMapper, TRUE);
@@ -1390,101 +1392,101 @@ static void test_default_presenter(void)
/* Query arbitrary supported interface back from device manager wrapper. */
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IDirect3DDeviceManager9, (void **)&dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_QueryInterface(dm, &IID_IQualProp, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IDirect3DDeviceManager9_QueryInterface(dm, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IUnknown, (void **)&unk2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk == unk2, "Unexpected interface.\n");
IUnknown_Release(unk2);
IUnknown_Release(unk);
IDirect3DDeviceManager9_Release(dm);
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_MIXER_SERVICE, &IID_IUnknown, (void **)&unk);
- ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDeviceID, (void **)&deviceid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, &iid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualIID(&iid, &IID_IDirect3DDevice9), "Unexpected id %s.\n", wine_dbgstr_guid(&iid));
IMFVideoDeviceID_Release(deviceid);
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
flags = 123;
hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!flags, "Unexpected rendering flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!flags, "Unexpected rendering flags %#lx.\n", flags);
IMFVideoDisplayControl_Release(display_control);
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Video window */
hwnd = create_window();
ok(!!hwnd, "Failed to create a test window.\n");
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hwnd2 = hwnd;
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &hwnd2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(hwnd2 == NULL, "Unexpected window %p.\n", hwnd2);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, (HWND)0x1);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, hwnd);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hwnd2 = NULL;
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &hwnd2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(hwnd2 == hwnd, "Unexpected window %p.\n", hwnd2);
/* Rate support. */
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFRateSupport, (void **)&rate_support);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, TRUE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, FALSE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, TRUE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
IMFRateSupport_Release(rate_support);
@@ -1500,7 +1502,7 @@ static void test_MFCreateVideoMixerAndPresenter(void)
HRESULT hr;
hr = MFCreateVideoMixerAndPresenter(NULL, NULL, &IID_IUnknown, (void **)&mixer, &IID_IUnknown, (void **)&presenter);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(mixer);
IUnknown_Release(presenter);
@@ -1564,97 +1566,97 @@ static void test_MFCreateVideoSampleAllocator(void)
BYTE *data;
hr = MFCreateVideoSampleAllocator(&IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = MFCreateVideoSampleAllocator(&IID_IMFVideoSampleAllocator, (void **)&allocator);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_QueryInterface(allocator, &IID_IMFVideoSampleAllocatorCallback, (void **)&allocator_cb);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, &test_notify);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = 10;
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!count, "Unexpected count %d.\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!count, "Unexpected count %ld.\n", count);
hr = IMFVideoSampleAllocator_UninitializeSampleAllocator(allocator);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample);
- ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* It expects IMFVideoMediaType aka video major type. Exact return code is E_NOINTERFACE,
likely coming from querying for IMFVideoMediaType. Does not seem valuable to match it. */
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, media_type);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, video_type);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
/* Frame size is required. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 240);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 0, video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(count == 1, "Unexpected count %d.\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 1, "Unexpected count %ld.\n", count);
sample = NULL;
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
refcount = get_refcount(sample);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample2);
- ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#lx.\n", hr);
/* Reinitialize with active sample. */
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 4, video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(refcount == get_refcount(sample), "Unexpected refcount %u.\n", get_refcount(sample));
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(refcount == get_refcount(sample), "Unexpected refcount %lu.\n", get_refcount(sample));
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(count == 4, "Unexpected count %d.\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 4, "Unexpected count %ld.\n", count);
check_interface(sample, &IID_IMFDesiredSample, TRUE);
check_interface(sample, &IID_IMFTrackedSample, TRUE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&gs);
- ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win7 */, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win7 */, "Unexpected hr %#lx.\n", hr);
/* Device manager wasn't set, sample gets regular memory buffers. */
if (SUCCEEDED(hr))
{
hr = IMFGetService_GetService(gs, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, (void **)&surface);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IMFGetService_Release(gs);
}
@@ -1667,7 +1669,7 @@ static void test_MFCreateVideoSampleAllocator(void)
IMFVideoSampleAllocator_Release(allocator);
hr = MFCreateVideoSampleAllocator(&IID_IMFVideoSampleAllocatorCallback, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
/* Using device manager */
@@ -1679,39 +1681,39 @@ static void test_MFCreateVideoSampleAllocator(void)
}
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = MFCreateVideoSampleAllocator(&IID_IMFVideoSampleAllocator, (void **)&allocator);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, (IUnknown *)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 240);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 0, video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(sample, &IID_IMFTrackedSample, TRUE);
check_interface(sample, &IID_IMFDesiredSample, TRUE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_service_interface(buffer, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, TRUE);
check_interface(buffer, &IID_IMF2DBuffer, TRUE);
check_interface(buffer, &IID_IMF2DBuffer2, TRUE);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
@@ -1772,7 +1774,7 @@ static HRESULT WINAPI test_host_LookupService(IMFTopologyServiceLookup *iface,
{
struct test_host *host = impl_from_test_host(iface);
- ok(*num_objects == 1, "Unexpected number of requested objects %u\n", *num_objects);
+ ok(*num_objects == 1, "Unexpected number of requested objects %lu\n", *num_objects);
memset(objects, 0, *num_objects * sizeof(*objects));
@@ -1863,8 +1865,8 @@ static void test_presenter_video_position(void)
struct test_host host;
IMFTransform *mixer;
RECT dst_rect;
+ UINT32 count;
HRESULT hr;
- DWORD count;
HWND hwnd;
hwnd = create_window();
@@ -1872,148 +1874,148 @@ static void test_presenter_video_position(void)
/* Setting position without the mixer. */
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 0, 0, 10, 10);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, hwnd);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFVideoDisplayControl_Release(display_control);
IMFVideoPresenter_Release(presenter);
/* With the mixer. */
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_test_host(&host, mixer, presenter);
/* Clear default mixer attributes, then attach presenter. */
hr = IMFTransform_GetAttributes(mixer, &mixer_attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_DeleteAllItems(mixer_attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_GetCount(mixer_attributes, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
memset(&src_rect, 0, sizeof(src_rect));
hr = IMFAttributes_GetBlob(mixer_attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&src_rect, sizeof(src_rect), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.0f && src_rect.top == 0.0f && src_rect.right == 1.0f &&
src_rect.bottom == 1.0f, "Unexpected source rectangle.\n");
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 1, 2, 3, 4);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.0f && src_rect.top == 0.0f && src_rect.right == 1.0f &&
src_rect.bottom == 1.0f, "Unexpected source rectangle.\n");
ok(dst_rect.left == 0 && dst_rect.right == 0 && dst_rect.top == 0 && dst_rect.bottom == 0,
"Unexpected destination rectangle %s.\n", wine_dbgstr_rect(&dst_rect));
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Setting position requires a window. */
SetRect(&dst_rect, 0, 0, 10, 10);
memset(&src_rect, 0, sizeof(src_rect));
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, hwnd);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 0, 0, 10, 10);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 1, 2, 3, 4);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(dst_rect.left == 0 && dst_rect.right == 10 && dst_rect.top == 0 && dst_rect.bottom == 10,
"Unexpected destination rectangle %s.\n", wine_dbgstr_rect(&dst_rect));
set_rect(&src_rect, 0.0f, 0.0f, 2.0f, 1.0f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&src_rect, -0.1f, 0.0f, 0.9f, 1.0f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Flipped source rectangle. */
set_rect(&src_rect, 0.5f, 0.0f, 0.4f, 1.0f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&src_rect, 0.0f, 0.5f, 0.4f, 0.1f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&src_rect, 0.1f, 0.2f, 0.8f, 0.9f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Presenter updates mixer attribute. */
memset(&src_rect, 0, sizeof(src_rect));
hr = IMFAttributes_GetBlob(mixer_attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&src_rect, sizeof(src_rect), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.1f && src_rect.top == 0.2f && src_rect.right == 0.8f &&
src_rect.bottom == 0.9f, "Unexpected source rectangle.\n");
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.1f && src_rect.top == 0.2f && src_rect.right == 0.8f &&
src_rect.bottom == 0.9f, "Unexpected source rectangle.\n");
SetRect(&dst_rect, 1, 2, 999, 1000);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 0, 1, 3, 4);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(dst_rect.left == 1 && dst_rect.right == 999 && dst_rect.top == 2 && dst_rect.bottom == 1000,
"Unexpected destination rectangle %s.\n", wine_dbgstr_rect(&dst_rect));
/* Flipped destination rectangle. */
SetRect(&dst_rect, 100, 1, 50, 1000);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 1, 100, 100, 50);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMFVideoDisplayControl_Release(display_control);
@@ -2038,86 +2040,86 @@ static void test_presenter_native_video_size(void)
IDirect3DDeviceManager9 *dm;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
memset(&size, 0xcc, sizeof(size));
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(size.cx == 0 && size.cy == 0, "Unexpected size.\n");
memset(&ratio, 0xcc, sizeof(ratio));
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, NULL, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ratio.cx == 0 && ratio.cy == 0, "Unexpected ratio.\n");
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Configure mixer primary stream. */
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDirect3DDeviceManager9_Release(dm);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Native video size is cached on initialization. */
init_test_host(&host, mixer, presenter);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size.cx == 640 && size.cy == 480, "Unexpected size %lu x %lu.\n", size.cx, size.cy);
ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */,
- "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
+ "Unexpected ratio %lu x %lu.\n", ratio.cx, ratio.cy);
/* Update input type. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)320 << 32 | 240);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size.cx == 640 && size.cy == 480, "Unexpected size %lu x %lu.\n", size.cx, size.cy);
ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */,
- "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
+ "Unexpected ratio %lu x %lu.\n", ratio.cx, ratio.cy);
/* Negotiating types updates native video size. */
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(size.cx == 320 && size.cy == 240, "Unexpected size %u x %u.\n", size.cx, size.cy);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size.cx == 320 && size.cy == 240, "Unexpected size %lu x %lu.\n", size.cx, size.cy);
ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */,
- "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
+ "Unexpected ratio %lu x %lu.\n", ratio.cx, ratio.cy);
IMFMediaType_Release(video_type);
IMFVideoDisplayControl_Release(display_control);
@@ -2132,26 +2134,26 @@ static void test_presenter_ar_mode(void)
DWORD mode;
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
mode = 0;
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(mode == (MFVideoARMode_PreservePicture | MFVideoARMode_PreservePixel), "Unexpected mode %#x.\n", mode);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(mode == (MFVideoARMode_PreservePicture | MFVideoARMode_PreservePixel), "Unexpected mode %#lx.\n", mode);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, 0x100);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_Mask);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
mode = 0;
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(mode == MFVideoARMode_Mask, "Unexpected mode %#x.\n", mode);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(mode == MFVideoARMode_Mask, "Unexpected mode %#lx.\n", mode);
IMFVideoDisplayControl_Release(display_control);
}
@@ -2169,73 +2171,73 @@ static void test_presenter_video_window(void)
HWND window;
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = MFGetService((IUnknown *)display_control, &MR_VIDEO_ACCELERATION_SERVICE,
&IID_IDirect3DDeviceManager9, (void **)&dm);
hr = IDirect3DDeviceManager9_OpenDeviceHandle(dm, &hdevice);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_LockDevice(dm, hdevice, &d3d_device, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetCreationParameters(d3d_device, &device_params);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(device_params.hFocusWindow == GetDesktopWindow(), "Unexpected window %p.\n", device_params.hFocusWindow);
hr = IDirect3DDevice9_GetSwapChain(d3d_device, 0, &swapchain);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_params);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(present_params.hDeviceWindow == GetDesktopWindow(), "Unexpected device window.\n");
ok(present_params.Windowed, "Unexpected windowed mode.\n");
ok(present_params.SwapEffect == D3DSWAPEFFECT_COPY, "Unexpected swap effect.\n");
- ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#x.\n", present_params.Flags);
+ ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#lx.\n", present_params.Flags);
ok(present_params.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE, "Unexpected present interval.\n");
IDirect3DSwapChain9_Release(swapchain);
IDirect3DDevice9_Release(d3d_device);
hr = IDirect3DDeviceManager9_UnlockDevice(dm, hdevice, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Setting window. */
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!window, "Unexpected window %p.\n", window);
window = create_window();
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Device is not recreated or reset on window change. */
hr = IDirect3DDeviceManager9_LockDevice(dm, hdevice, &d3d_device, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetSwapChain(d3d_device, 0, &swapchain);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_params);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(present_params.hDeviceWindow == GetDesktopWindow(), "Unexpected device window.\n");
ok(present_params.Windowed, "Unexpected windowed mode.\n");
ok(present_params.SwapEffect == D3DSWAPEFFECT_COPY, "Unexpected swap effect.\n");
- ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#x.\n", present_params.Flags);
+ ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#lx.\n", present_params.Flags);
ok(present_params.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE, "Unexpected present interval.\n");
IDirect3DSwapChain9_Release(swapchain);
IDirect3DDevice9_Release(d3d_device);
hr = IDirect3DDeviceManager9_UnlockDevice(dm, hdevice, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_CloseDeviceHandle(dm, hdevice);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFVideoDisplayControl_Release(display_control);
@@ -2254,31 +2256,31 @@ static void test_presenter_quality_control(void)
HRESULT hr;
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFQualityAdviseLimits, (void **)&qa_limits);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFQualityAdvise, (void **)&advise);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdviseLimits_GetMaximumDropMode(qa_limits, NULL);
todo_wine
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdviseLimits_GetMaximumDropMode(qa_limits, &mode);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ok(mode == MF_DROP_MODE_NONE, "Unexpected mode %d.\n", mode);
hr = IMFQualityAdviseLimits_GetMinimumQualityLevel(qa_limits, NULL);
todo_wine
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdviseLimits_GetMinimumQualityLevel(qa_limits, &level);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ok(level == MF_QUALITY_NORMAL, "Unexpected level %d.\n", level);
@@ -2287,31 +2289,31 @@ static void test_presenter_quality_control(void)
todo_wine {
mode = 1;
hr = IMFQualityAdvise_GetDropMode(advise, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mode == MF_DROP_MODE_NONE, "Unexpected mode %d.\n", mode);
level = 1;
hr = IMFQualityAdvise_GetQualityLevel(advise, &level);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(level == MF_QUALITY_NORMAL, "Unexpected mode %d.\n", level);
hr = IMFQualityAdvise_SetDropMode(advise, MF_DROP_MODE_1);
- ok(hr == MF_E_NO_MORE_DROP_MODES, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_MORE_DROP_MODES, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdvise_SetQualityLevel(advise, MF_QUALITY_NORMAL_MINUS_1);
- ok(hr == MF_E_NO_MORE_QUALITY_LEVELS, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_MORE_QUALITY_LEVELS, "Unexpected hr %#lx.\n", hr);
}
IMFQualityAdvise_Release(advise);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IQualProp, (void **)&qual_prop);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, NULL);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, &frame_count);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IQualProp_Release(qual_prop);
@@ -2328,16 +2330,16 @@ static void get_output_aperture(IMFTransform *mixer, SIZE *frame_size, MFVideoAr
memset(aperture, 0xcc, sizeof(*aperture));
hr = IMFTransform_GetOutputCurrentType(mixer, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &size);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
frame_size->cx = size >> 32;
frame_size->cy = size;
hr = IMFMediaType_GetBlob(media_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)aperture, sizeof(*aperture), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type);
}
@@ -2367,74 +2369,74 @@ static void test_presenter_media_type(void)
}
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
input_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(input_type, &MF_MT_FRAME_SIZE, (UINT64)100 << 32 | 50);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(input_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_test_host(&host, mixer, presenter);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Set destination rectangle before mixer types are configured. */
SetRect(&dst, 0, 0, 101, 51);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, input_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
get_output_aperture(mixer, &frame_size, &aperture);
- ok(frame_size.cx == 101 && frame_size.cy == 51, "Unexpected frame size %u x %u.\n", frame_size.cx, frame_size.cy);
- ok(aperture.Area.cx == 101 && aperture.Area.cy == 51, "Unexpected size %u x %u.\n", aperture.Area.cx, aperture.Area.cy);
+ ok(frame_size.cx == 101 && frame_size.cy == 51, "Unexpected frame size %lu x %lu.\n", frame_size.cx, frame_size.cy);
+ ok(aperture.Area.cx == 101 && aperture.Area.cy == 51, "Unexpected size %lu x %lu.\n", aperture.Area.cx, aperture.Area.cy);
ok(!aperture.OffsetX.value && !aperture.OffsetX.fract && !aperture.OffsetY.value && !aperture.OffsetY.fract,
"Unexpected offset %u x %u.\n", aperture.OffsetX.value, aperture.OffsetY.value);
SetRect(&dst, 1, 2, 200, 300);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
get_output_aperture(mixer, &frame_size, &aperture);
- ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %u x %u.\n", frame_size.cx, frame_size.cy);
- ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %u x %u.\n", aperture.Area.cx, aperture.Area.cy);
+ ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %lu x %lu.\n", frame_size.cx, frame_size.cy);
+ ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %lu x %lu.\n", aperture.Area.cx, aperture.Area.cy);
ok(!aperture.OffsetX.value && !aperture.OffsetX.fract && !aperture.OffsetY.value && !aperture.OffsetY.fract,
"Unexpected offset %u x %u.\n", aperture.OffsetX.value, aperture.OffsetY.value);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_None);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
get_output_aperture(mixer, &frame_size, &aperture);
- ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %u x %u.\n", frame_size.cx, frame_size.cy);
- ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %u x %u.\n", aperture.Area.cx, aperture.Area.cy);
+ ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %lu x %lu.\n", frame_size.cx, frame_size.cy);
+ ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %lu x %lu.\n", aperture.Area.cx, aperture.Area.cy);
ok(!aperture.OffsetX.value && !aperture.OffsetX.fract && !aperture.OffsetY.value && !aperture.OffsetY.fract,
"Unexpected offset %u x %u.\n", aperture.OffsetX.value, aperture.OffsetY.value);
@@ -2466,80 +2468,80 @@ static void test_presenter_shutdown(void)
ok(!!window, "Failed to create test window.\n");
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDeviceID, (void **)&deviceid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IQualProp, (void **)&qual_prop);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyServiceLookupClient_ReleaseServicePointers(lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_BEGINSTREAMING, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_ENDSTREAMING, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_PROCESSINPUTNOTIFY, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_GetCurrentMediaType(presenter, &media_type);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, &iid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &size);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetIdealVideoSize(display_control, &size, &size);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 10, 10);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, NULL, &rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_None);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &window2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_RepaintVideo(display_control);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, NULL);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, &frame_count);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyServiceLookupClient_ReleaseServicePointers(lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IQualProp_Release(qual_prop);
IMFVideoDeviceID_Release(deviceid);
@@ -2559,52 +2561,52 @@ static void test_mixer_output_rectangle(void)
HRESULT hr;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoMixerControl, (void **)&mixer_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == S_OK, "Failed to get output rect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get output rect, hr %#lx.\n", hr);
ok(rect.left == 0.0f && rect.top == 0.0f && rect.right == 1.0f && rect.bottom == 1.0f,
"Unexpected rectangle.\n");
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 1, &rect);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 1, &rect);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Wrong bounds. */
set_rect(&rect, 0.0f, 0.0f, 1.1f, 1.0f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&rect, -0.1f, 0.0f, 0.5f, 1.0f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Flipped. */
set_rect(&rect, 1.0f, 0.0f, 0.0f, 1.0f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 1.0f, 1.0f, 0.5f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFVideoMixerControl_Release(mixer_control);
IMFTransform_Release(mixer);
@@ -2619,96 +2621,96 @@ static void test_mixer_zorder(void)
HRESULT hr;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoMixerControl, (void **)&mixer_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
value = 1;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 0, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!value, "Unexpected value %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!value, "Unexpected value %lu.\n", value);
value = 1;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, &value);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 0, 1);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 1, 1);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Exceeds maximum stream number. */
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 0, 20);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
value = 1;
hr = IMFTransform_AddInputStreams(mixer, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 1, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 1, "Unexpected zorder %lu.\n", value);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 1, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 1, 2);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 0, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 2;
hr = IMFTransform_AddInputStreams(mixer, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 2, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 2, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 2, "Unexpected zorder %lu.\n", value);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 2, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 3;
hr = IMFTransform_AddInputStreams(mixer, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 3, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 3, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 3, "Unexpected zorder %lu.\n", value);
hr = IMFTransform_DeleteInputStream(mixer, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(mixer, 2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(mixer, 3);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ids[0] = 2;
ids[1] = 1;
hr = IMFTransform_AddInputStreams(mixer, 2, ids);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 2, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 2, "Unexpected zorder %lu.\n", value);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 2, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 1, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 1, "Unexpected zorder %lu.\n", value);
IMFVideoMixerControl_Release(mixer_control);
IMFTransform_Release(mixer);
@@ -2724,31 +2726,31 @@ static IDirect3DSurface9 * create_surface(IDirect3DDeviceManager9 *manager, unsi
HRESULT hr;
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_LockDevice(manager, handle, &device, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_GetVideoService(manager, handle, &IID_IDirectXVideoProcessorService,
(void **)&service);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXVideoAccelerationService_CreateSurface(service, width, height, 0, D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT, 0, DXVA2_VideoProcessorRenderTarget, &surface, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDirectXVideoAccelerationService_Release(service);
hr = IDirect3DDevice9_ColorFill(device, surface, NULL, D3DCOLOR_ARGB(0x10, 0xff, 0x00, 0x00));
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDirect3DDevice9_Release(device);
hr = IDirect3DDeviceManager9_UnlockDevice(manager, handle, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_CloseDeviceHandle(manager, handle);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return surface;
}
@@ -2762,18 +2764,18 @@ static DWORD get_surface_color(IDirect3DSurface9 *surface, unsigned int x, unsig
HRESULT hr;
hr = IDirect3DSurface9_GetDesc(surface, &desc);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(x < desc.Width && y < desc.Height, "Invalid coordinate.\n");
if (x >= desc.Width || y >= desc.Height) return 0;
hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
row = (DWORD *)((char *)locked_rect.pBits + y * locked_rect.Pitch);
color = row[x];
hr = IDirect3DSurface9_UnlockRect(surface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return color;
}
@@ -2787,13 +2789,14 @@ static void test_mixer_samples(void)
IMFDesiredSample *desired;
IDirect3DDevice9 *device;
IMFMediaType *video_type;
- DWORD count, flags, color, status;
+ DWORD flags, color, status;
IMFTransform *mixer;
IMFSample *sample, *sample2;
HWND window;
UINT token;
HRESULT hr;
LONGLONG pts, duration;
+ UINT32 count;
window = create_window();
if (!(device = create_device(window)))
@@ -2803,217 +2806,217 @@ static void test_mixer_samples(void)
}
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 1, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStatus(mixer, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
/* Configure device and media types. */
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
status = 0;
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#lx.\n", status);
hr = IMFTransform_GetInputStatus(mixer, 1, &status);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
status = ~0u;
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
IMFMediaType_Release(video_type);
memset(buffers, 0, sizeof(buffers));
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* It needs a sample with a backing surface. */
hr = MFCreateSample(&sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
buffers[0].pSample = sample;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
surface = create_surface(manager, 64, 64);
hr = MFCreateVideoSampleFromSurface((IUnknown *)surface, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_QueryInterface(sample, &IID_IMFDesiredSample, (void **)&desired);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
buffers[0].pSample = sample;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#lx.\n", hr);
color = get_surface_color(surface, 0, 0);
- ok(color == D3DCOLOR_ARGB(0x10, 0xff, 0x00, 0x00), "Unexpected color %#x.\n", color);
+ ok(color == D3DCOLOR_ARGB(0x10, 0xff, 0x00, 0x00), "Unexpected color %#lx.\n", color);
/* Streaming is not started yet. Output is colored black, but only if desired timestamps were set. */
IMFDesiredSample_SetDesiredSampleTimeAndDuration(desired, 100, 0);
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
color = get_surface_color(surface, 0, 0);
- ok(!color, "Unexpected color %#x.\n", color);
+ ok(!color, "Unexpected color %#lx.\n", color);
hr = IMFVideoProcessor_SetBackgroundColor(processor, RGB(0, 0, 255));
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
color = get_surface_color(surface, 0, 0);
- ok(!color, "Unexpected color %#x.\n", color);
+ ok(!color, "Unexpected color %#lx.\n", color);
hr = IMFTransform_ProcessOutput(mixer, 0, 2, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
buffers[1].pSample = sample;
hr = IMFTransform_ProcessOutput(mixer, 0, 2, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
buffers[0].dwStreamID = 1;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
IMFDesiredSample_Clear(desired);
hr = IMFTransform_ProcessInput(mixer, 0, NULL, 0);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(mixer, 5, NULL, 0);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
status = 0;
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#lx.\n", status);
status = ~0u;
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
status = ~0u;
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(mixer, 5, sample, 0);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
/* ProcessOutput() sets sample time and duration. */
hr = MFCreateVideoSampleFromSurface((IUnknown *)surface, &sample2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetUINT32(sample2, &IID_IMFSample, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(sample2, 0x123);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample2, &pts);
- ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample2, &duration);
- ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleTime(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleDuration(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
memset(buffers, 0, sizeof(buffers));
buffers[0].pSample = sample2;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample2, &pts);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!pts, "Unexpected sample time.\n");
hr = IMFSample_GetSampleDuration(sample2, &duration);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!duration, "Unexpected duration\n");
/* Flags are not copied. */
hr = IMFSample_GetSampleFlags(sample2, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(flags == 0x123, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(flags == 0x123, "Unexpected flags %#lx.\n", flags);
/* Attributes are not removed. */
hr = IMFSample_GetCount(sample2, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
IMFSample_Release(sample2);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_COMMAND_DRAIN, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
@@ -3093,39 +3096,39 @@ static void test_mixer_render(void)
}
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoMixerControl, (void **)&mixer_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Configure device and media types. */
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)64 << 32 | 64);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(mixer, 0, 0, &output_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(mixer, 0, output_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(output_type);
IMFMediaType_Release(video_type);
@@ -3134,41 +3137,41 @@ static void test_mixer_render(void)
ok(!!surface, "Failed to create input surface.\n");
hr = MFCreateVideoSampleFromSurface((IUnknown *)surface, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 1);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 2);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#lx.\n", status);
/* FLUSH/END_STREAMING releases input */
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_NOTIFY_END_STREAMING, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 1);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 2);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_COMMAND_FLUSH, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 1);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
IMFSample_Release(sample);
IDirect3DSurface9_Release(surface);
@@ -3190,7 +3193,7 @@ START_TEST(evr)
if (FAILED(hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter)))
{
- win_skip("Failed to create default presenter, hr %#x. Skipping tests.\n", hr);
+ win_skip("Failed to create default presenter, hr %#lx. Skipping tests.\n", hr);
CoUninitialize();
return;
}
--
2.34.1
1
0
[PATCH 7/7] comctl32/button: Use the brush from WM_CTLCOLORSTATIC to fill text background for group boxes.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/button.c | 13 ++++++++++++-
dlls/comctl32/tests/misc.c | 3 +--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 1349e10c4c0..2ce12252460 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -2914,10 +2914,20 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
HFONT font, hPrevFont = NULL;
BOOL created_font = FALSE;
TEXTMETRICW textMetric;
+ HBRUSH brush;
+ HWND parent;
+ HRESULT hr;
LONG style;
int part;
- HRESULT hr = GetThemeFont(theme, hDC, BP_GROUPBOX, state, TMT_FONT, &lf);
+ /* DrawThemeParentBackground() is used for filling content background. The brush from
+ * WM_CTLCOLORSTATIC is used for filling text background */
+ parent = GetParent(infoPtr->hwnd);
+ if (!parent)
+ parent = infoPtr->hwnd;
+ brush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC, (WPARAM)hDC, (LPARAM)infoPtr->hwnd);
+
+ hr = GetThemeFont(theme, hDC, BP_GROUPBOX, state, TMT_FONT, &lf);
if (SUCCEEDED(hr)) {
font = CreateFontIndirectW(&lf);
if (!font)
@@ -2969,6 +2979,7 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
SelectClipRgn(hDC, textRegion);
DeleteObject(textRegion);
}
+ FillRect(hDC, &textRect, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &imageRect, &textRect, theme, part, state);
}
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index c3de9e68c5a..dc9648c1bf0 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -848,7 +848,7 @@ static void test_themed_background(void)
{WC_BUTTONA, BS_RADIOBUTTON, radiobutton_seq},
{WC_BUTTONA, BS_3STATE, checkbox_seq},
{WC_BUTTONA, BS_AUTO3STATE, checkbox_seq},
- {WC_BUTTONA, BS_GROUPBOX, groupbox_seq, TRUE},
+ {WC_BUTTONA, BS_GROUPBOX, groupbox_seq},
{WC_BUTTONA, BS_USERBUTTON, pushbutton_seq},
{WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq},
{WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
@@ -962,7 +962,6 @@ static void test_themed_background(void)
/* WM_CTLCOLORSTATIC is used to fill text background */
color = GetPixel(hdc, 10, 10);
- todo_wine
ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
}
--
2.32.0
1
0
[PATCH 5/7] comctl32/button: Use the brush from WM_CTLCOLORBTN to fill background for push buttons.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
The brush from WM_CTLCOLORBTN is used for filling background for push buttons after a DrawThemeParentBackground() call
according to tests.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/button.c | 7 +++++++
dlls/comctl32/tests/misc.c | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 88b48a4a5c0..14b2200afed 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -2729,6 +2729,7 @@ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
{
RECT bgRect, labelRect, imageRect, textRect, focusRect;
NMCUSTOMDRAW nmcd;
+ HBRUSH brush;
LRESULT cdrf;
HWND parent;
@@ -2748,7 +2749,13 @@ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
if (cdrf & CDRF_SKIPDEFAULT) return;
if (IsThemeBackgroundPartiallyTransparent(theme, BP_PUSHBUTTON, state))
+ {
DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL);
+ /* Tests show that the brush from WM_CTLCOLORBTN is used for filling background after a
+ * DrawThemeParentBackground() call */
+ brush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORBTN, (WPARAM)hDC, (LPARAM)infoPtr->hwnd);
+ FillRect(hDC, &bgRect, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
+ }
DrawThemeBackground(theme, hDC, BP_PUSHBUTTON, state, &bgRect, NULL);
if (cdrf & CDRF_NOTIFYPOSTERASE)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 72674ea5942..09c5b3d6c40 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -841,15 +841,15 @@ static void test_themed_background(void)
tests[] =
{
{ANIMATE_CLASSA, 0, empty_seq, TRUE},
- {WC_BUTTONA, BS_PUSHBUTTON, pushbutton_seq, TRUE},
- {WC_BUTTONA, BS_DEFPUSHBUTTON, defpushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_PUSHBUTTON, pushbutton_seq},
+ {WC_BUTTONA, BS_DEFPUSHBUTTON, defpushbutton_seq},
{WC_BUTTONA, BS_CHECKBOX, checkbox_seq, TRUE},
{WC_BUTTONA, BS_AUTOCHECKBOX, checkbox_seq, TRUE},
{WC_BUTTONA, BS_RADIOBUTTON, radiobutton_seq, TRUE},
{WC_BUTTONA, BS_3STATE, checkbox_seq, TRUE},
{WC_BUTTONA, BS_AUTO3STATE, checkbox_seq, TRUE},
{WC_BUTTONA, BS_GROUPBOX, groupbox_seq, TRUE},
- {WC_BUTTONA, BS_USERBUTTON, pushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_USERBUTTON, pushbutton_seq},
{WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq, TRUE},
{WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
{WC_BUTTONA, BS_OWNERDRAW, ownerdrawbutton_seq},
--
2.32.0
1
0
[PATCH 4/7] comctl32/trackbar: Always use brush from WM_CTLCOLORSTATIC to fill background.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Fix the track bar of Mupen64-RR-Lua input window having black background. Mupen64-RR-Lua doesn't actually handle
WM_ERASEBKGND even though it returns nonzero. And tests show that only WM_CTLCOLORSTATIC is sent when drawing themed
trackbar background.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/tests/misc.c | 2 +-
dlls/comctl32/trackbar.c | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 3a1b5253b58..72674ea5942 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -883,7 +883,7 @@ static void test_themed_background(void)
{WC_TABCONTROLA, 0, drawthemeparentbackground_seq, TRUE},
{TOOLBARCLASSNAMEA, 0, empty_seq, TRUE},
{TOOLTIPS_CLASSA, 0, empty_seq},
- {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq, TRUE},
+ {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq},
{WC_TREEVIEWA, 0, treeview_seq},
{UPDOWN_CLASSA, 0, empty_seq},
{WC_SCROLLBARA, 0, scrollbar_seq, TRUE},
diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index 6643752c043..f2cb2a07a8d 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -899,6 +899,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
NMCUSTOMDRAW nmcd;
int gcdrf, icdrf;
+ HBRUSH brush;
if (infoPtr->flags & TB_THUMBCHANGED) {
TRACKBAR_UpdateThumb (infoPtr);
@@ -943,14 +944,9 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
/* Erase background */
if (gcdrf == CDRF_DODEFAULT ||
notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) {
- if (GetWindowTheme (infoPtr->hwndSelf)) {
- DrawThemeParentBackground (infoPtr->hwndSelf, hdc, 0);
- }
- else {
- HBRUSH brush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLORSTATIC,
- (WPARAM)hdc, (LPARAM)infoPtr->hwndSelf);
- FillRect (hdc, &rcClient, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
- }
+ brush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLORSTATIC, (WPARAM)hdc,
+ (LPARAM)infoPtr->hwndSelf);
+ FillRect(hdc, &rcClient, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
if (gcdrf != CDRF_DODEFAULT)
notify_customdraw(infoPtr, &nmcd, CDDS_POSTERASE);
}
--
2.32.0
1
0
Add themed background tests to determine whether DrawThemeParentBackground()
or WM_CTLCOLOR* are used to draw themed background for comctl32 classes.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/tests/misc.c | 327 +++++++++++++++++++++++++++++++++++++
1 file changed, 327 insertions(+)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 4628e37bb7a..3a1b5253b58 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -46,6 +46,7 @@ static HMODULE hComctl32;
enum seq_index
{
CHILD_SEQ_INDEX,
+ PARENT_SEQ_INDEX,
NUM_MSG_SEQUENCES
};
@@ -652,6 +653,331 @@ static void test_WM_SYSCOLORCHANGE(void)
DestroyWindow(parent);
}
+static const struct message empty_seq[] =
+{
+ {0}
+};
+
+static const struct message wm_erasebkgnd_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {0}
+};
+
+static const struct message wm_ctlcolorstatic_seq[] =
+{
+ {WM_CTLCOLORSTATIC, sent},
+ {0}
+};
+
+static const struct message drawthemeparentbackground_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {0}
+};
+
+static const struct message drawthemeparentbackground_optional_seq[] =
+{
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {0}
+};
+
+static const struct message pushbutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {WM_CTLCOLORBTN, sent},
+ {0}
+};
+
+static const struct message defpushbutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {WM_CTLCOLORBTN, sent},
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLORBTN, sent | optional},
+ {0}
+};
+
+static const struct message checkbox_seq[] =
+{
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLORSTATIC, sent},
+ {0}
+};
+
+static const struct message radiobutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {WM_CTLCOLORSTATIC, sent},
+ {0}
+};
+
+static const struct message groupbox_seq[] =
+{
+ {WM_CTLCOLORSTATIC, sent},
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {0}
+};
+
+static const struct message ownerdrawbutton_seq[] =
+{
+ {WM_CTLCOLORBTN, sent},
+ {WM_CTLCOLORBTN, sent},
+ {0}
+};
+
+static const struct message splitbutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ /* Either WM_CTLCOLORSTATIC or WM_CTLCOLORBTN */
+ {WM_CTLCOLORSTATIC, sent | optional},
+ {WM_CTLCOLORBTN, sent | optional},
+ /* BS_DEFSPLITBUTTON or BS_DEFCOMMANDLINK */
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLORSTATIC, sent | optional},
+ {WM_CTLCOLORBTN, sent | optional},
+ {0}
+};
+
+static const struct message combobox_seq[] =
+{
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLOREDIT, sent},
+ {WM_CTLCOLORLISTBOX, sent},
+ {WM_CTLCOLORLISTBOX, sent | optional},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {0}
+};
+
+static const struct message edit_seq[] =
+{
+ {WM_CTLCOLOREDIT, sent},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {0}
+};
+
+static const struct message listbox_seq[] =
+{
+ {WM_CTLCOLORLISTBOX, sent},
+ {WM_CTLCOLORLISTBOX, sent},
+ {0}
+};
+
+static const struct message treeview_seq[] =
+{
+ {WM_CTLCOLOREDIT, sent | optional},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {0}
+};
+
+static const struct message scrollbar_seq[] =
+{
+ {WM_CTLCOLORSCROLLBAR, sent},
+ {WM_CTLCOLORSCROLLBAR, sent | optional},
+ {0}
+};
+
+static LRESULT WINAPI test_themed_background_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
+{
+ struct message msg = {0};
+ HBRUSH brush;
+ RECT rect;
+
+ if (message == WM_ERASEBKGND || message == WM_PRINTCLIENT || (message >= WM_CTLCOLORMSGBOX
+ && message <= WM_CTLCOLORSTATIC))
+ {
+ msg.message = message;
+ msg.flags = sent;
+ add_message(sequences, PARENT_SEQ_INDEX, &msg);
+ }
+
+ if (message == WM_ERASEBKGND)
+ {
+ brush = CreateSolidBrush(RGB(255, 0, 0));
+ GetClientRect(hwnd, &rect);
+ FillRect((HDC)wp, &rect, brush);
+ DeleteObject(brush);
+ return 1;
+ }
+ else if (message >= WM_CTLCOLORMSGBOX && message <= WM_CTLCOLORSTATIC)
+ {
+ return (LRESULT)GetStockObject(GRAY_BRUSH);
+ }
+
+ return DefWindowProcA(hwnd, message, wp, lp);
+}
+
+static void test_themed_background(void)
+{
+ DPI_AWARENESS_CONTEXT (WINAPI *pSetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT);
+ DPI_AWARENESS_CONTEXT old_context = NULL;
+ BOOL (WINAPI *pIsThemeActive)(void);
+ HWND child, parent;
+ HMODULE uxtheme;
+ COLORREF color;
+ WNDCLASSA cls;
+ HDC hdc;
+ int i;
+
+ static const struct test
+ {
+ const CHAR *class_name;
+ DWORD style;
+ const struct message *seq;
+ BOOL todo;
+ }
+ tests[] =
+ {
+ {ANIMATE_CLASSA, 0, empty_seq, TRUE},
+ {WC_BUTTONA, BS_PUSHBUTTON, pushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_DEFPUSHBUTTON, defpushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_CHECKBOX, checkbox_seq, TRUE},
+ {WC_BUTTONA, BS_AUTOCHECKBOX, checkbox_seq, TRUE},
+ {WC_BUTTONA, BS_RADIOBUTTON, radiobutton_seq, TRUE},
+ {WC_BUTTONA, BS_3STATE, checkbox_seq, TRUE},
+ {WC_BUTTONA, BS_AUTO3STATE, checkbox_seq, TRUE},
+ {WC_BUTTONA, BS_GROUPBOX, groupbox_seq, TRUE},
+ {WC_BUTTONA, BS_USERBUTTON, pushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq, TRUE},
+ {WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
+ {WC_BUTTONA, BS_OWNERDRAW, ownerdrawbutton_seq},
+ {WC_BUTTONA, BS_SPLITBUTTON, splitbutton_seq},
+ {WC_BUTTONA, BS_DEFSPLITBUTTON, splitbutton_seq},
+ {WC_BUTTONA, BS_COMMANDLINK, splitbutton_seq},
+ {WC_BUTTONA, BS_DEFCOMMANDLINK, splitbutton_seq},
+ {WC_COMBOBOXA, 0, combobox_seq, TRUE},
+ {WC_COMBOBOXEXA, 0, drawthemeparentbackground_optional_seq},
+ {DATETIMEPICK_CLASSA, 0, drawthemeparentbackground_optional_seq, TRUE},
+ {WC_EDITA, 0, edit_seq},
+ {WC_HEADERA, 0, empty_seq},
+ {HOTKEY_CLASSA, 0, empty_seq, TRUE},
+ {WC_IPADDRESSA, 0, empty_seq},
+ {WC_LISTBOXA, 0, listbox_seq, TRUE},
+ {WC_LISTVIEWA, 0, empty_seq},
+ {MONTHCAL_CLASSA, 0, empty_seq},
+ {WC_NATIVEFONTCTLA, 0, empty_seq},
+ {WC_PAGESCROLLERA, 0, wm_erasebkgnd_seq},
+ {PROGRESS_CLASSA, 0, drawthemeparentbackground_optional_seq},
+ {REBARCLASSNAMEA, 0, empty_seq},
+ {WC_STATICA, SS_LEFT, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_ICON, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_BLACKRECT, wm_ctlcolorstatic_seq, TRUE},
+ {WC_STATICA, SS_OWNERDRAW, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_BITMAP, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_ENHMETAFILE, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_ETCHEDHORZ, wm_ctlcolorstatic_seq, TRUE},
+ {STATUSCLASSNAMEA, 0, empty_seq},
+ {"SysLink", 0, wm_ctlcolorstatic_seq},
+ {WC_TABCONTROLA, 0, drawthemeparentbackground_seq, TRUE},
+ {TOOLBARCLASSNAMEA, 0, empty_seq, TRUE},
+ {TOOLTIPS_CLASSA, 0, empty_seq},
+ {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq, TRUE},
+ {WC_TREEVIEWA, 0, treeview_seq},
+ {UPDOWN_CLASSA, 0, empty_seq},
+ {WC_SCROLLBARA, 0, scrollbar_seq, TRUE},
+ {WC_SCROLLBARA, SBS_SIZEBOX, empty_seq, TRUE},
+ {WC_SCROLLBARA, SBS_SIZEGRIP, empty_seq, TRUE},
+ };
+
+ uxtheme = LoadLibraryA("uxtheme.dll");
+ pIsThemeActive = (void *)GetProcAddress(uxtheme, "IsThemeActive");
+ if (!pIsThemeActive())
+ {
+ skip("Theming is inactive.\n");
+ FreeLibrary(uxtheme);
+ return;
+ }
+ FreeLibrary(uxtheme);
+
+ pSetThreadDpiAwarenessContext = (void *)GetProcAddress(GetModuleHandleA("user32.dll"),
+ "SetThreadDpiAwarenessContext");
+ if (pSetThreadDpiAwarenessContext)
+ pSetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
+
+ memset(&cls, 0, sizeof(cls));
+ cls.hInstance = GetModuleHandleA(0);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
+ cls.hbrBackground = GetStockObject(WHITE_BRUSH);
+ cls.lpfnWndProc = test_themed_background_proc;
+ cls.lpszClassName = "ParentClass";
+ RegisterClassA(&cls);
+
+ parent = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 100, 100,
+ 0, 0, 0, 0);
+ ok(parent != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ winetest_push_context("%s %#x", tests[i].class_name, tests[i].style);
+
+ child = CreateWindowA(tests[i].class_name, " ", WS_CHILD | WS_VISIBLE | tests[i].style,
+ 0, 0, 50, 50, parent, 0, 0, 0);
+ ok(child != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
+ flush_events();
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ RedrawWindow(child, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME);
+ ok_sequence(sequences, PARENT_SEQ_INDEX, tests[i].seq, "paint background", tests[i].todo);
+
+ /* For message sequences that contain both DrawThemeParentBackground() messages and
+ * WM_CTLCOLOR*, do a color test to check which is really in effect for controls that can be
+ * tested automatically. For WM_ERASEBKGND from DrawThemeParentBackground(), a red brush is
+ * used. For WM_CTLCOLOR*, a gray brush is returned. If there are only WM_CTLCOLOR* messages
+ * in the message sequence, then surely DrawThemeParentBackground() is not used.
+ *
+ * For tests that use pushbutton_seq and defpushbutton_seq, manual tests on XP show that
+ * a brush from WM_CTLCOLORBTN is used to fill background even after a successful
+ * DrawThemeParentBackground(). This behavior can be verified by returning a gray or hollow
+ * brush in test_themed_background_proc() when handling WM_CTLCOLORBTN. It can't be tested
+ * automatically here because stock Windows themes don't use transparent button bitmaps */
+ if (tests[i].seq == radiobutton_seq || tests[i].seq == groupbox_seq)
+ {
+ hdc = GetDC(child);
+
+ if (tests[i].seq == radiobutton_seq)
+ {
+ /* WM_CTLCOLORSTATIC is used to fill background */
+ color = GetPixel(hdc, 40, 40);
+ todo_wine
+ ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
+ }
+ else if (tests[i].seq == groupbox_seq)
+ {
+ /* DrawThemeParentBackground() is used to fill content background */
+ color = GetPixel(hdc, 40, 40);
+ ok(color == 0xff, "Expected color %#x, got %#x.\n", 0xff, color);
+
+ /* WM_CTLCOLORSTATIC is used to fill text background */
+ color = GetPixel(hdc, 10, 10);
+ todo_wine
+ ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
+ }
+
+ ReleaseDC(child, hdc);
+ }
+
+ DestroyWindow(child);
+ winetest_pop_context();
+ }
+
+ DestroyWindow(parent);
+ UnregisterClassA(cls.lpszClassName, GetModuleHandleA(0));
+ if (pSetThreadDpiAwarenessContext)
+ pSetThreadDpiAwarenessContext(old_context);
+}
+
START_TEST(misc)
{
ULONG_PTR ctx_cookie;
@@ -675,6 +1001,7 @@ START_TEST(misc)
test_comctl32_classes(TRUE);
test_builtin_classes();
test_LoadIconWithScaleDown();
+ test_themed_background();
test_WM_THEMECHANGED();
test_WM_SYSCOLORCHANGE();
--
2.32.0
1
0
[PATCH 2/7] uxtheme: Use tab background as dialog texture for more WM_CTLCOLOR* messages.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/uxtheme/dialog.c | 3 +++
dlls/uxtheme/tests/system.c | 15 ++-------------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/dlls/uxtheme/dialog.c b/dlls/uxtheme/dialog.c
index 87c2b7d1c13..b91e20f0f33 100644
--- a/dlls/uxtheme/dialog.c
+++ b/dlls/uxtheme/dialog.c
@@ -149,6 +149,9 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, BOO
SetBrushOrgEx(hdc, old_org.x, old_org.y, NULL);
return TRUE;
}
+ case WM_CTLCOLORMSGBOX:
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC:
{
dlgproc = (WNDPROC)GetWindowLongPtrW(hwnd, DWLP_DLGPROC);
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 77a12f3fa44..c70e6c27361 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -1854,7 +1854,6 @@ static void test_EnableThemeDialogTexture(void)
}
else
{
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
}
@@ -1863,7 +1862,6 @@ static void test_EnableThemeDialogTexture(void)
ok(old_mode != 0, "SetBkMode failed.\n");
SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
mode = SetBkMode(child_hdc, old_mode);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
/* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
@@ -1879,24 +1877,18 @@ static void test_EnableThemeDialogTexture(void)
memset(&log_brush, 0, sizeof(log_brush));
count = GetObjectA(brush, sizeof(log_brush), &log_brush);
ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
log_brush.lbStyle);
memset(&bmp, 0, sizeof(bmp));
count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
/* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
brush2 = (HBRUSH)DefDlgProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
ok(brush2 == brush, "Expected the same brush.\n");
@@ -1905,24 +1897,21 @@ static void test_EnableThemeDialogTexture(void)
/* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
if (msg != WM_CTLCOLORDLG)
{
brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ todo_wine
ok(brush2 == brush, "Expected the same brush.\n");
brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ todo_wine
ok(brush2 == brush, "Expected the same brush.\n");
}
else
{
brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
ok(brush2 != brush, "Expected a different brush.\n");
brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
ok(brush2 != brush, "Expected a different brush.\n");
}
--
2.32.0
1
0
[PATCH 1/7] uxtheme/tests: Test more WM_CTLCOLOR* messages for dialog theming.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Test that some WM_CTLCOLOR* other than WM_CTLCOLORSTATIC also use tab background as dialog texture.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/uxtheme/tests/system.c | 150 ++++++++++++++++++++++--------------
1 file changed, 94 insertions(+), 56 deletions(-)
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 980676f9e57..77a12f3fa44 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -1617,6 +1617,7 @@ static void test_EnableThemeDialogTexture(void)
LRESULT lr;
POINT org;
SIZE size;
+ UINT msg;
BOOL ret;
struct
@@ -1822,74 +1823,111 @@ static void test_EnableThemeDialogTexture(void)
GetSysColorBrush(COLOR_MENU), brush);
handle_WM_CTLCOLORSTATIC = FALSE;
- /* Test that WM_CTLCOLORSTATIC changes brush origin when dialog texture is on */
- ret = SetBrushOrgEx(child_hdc, 0, 0, NULL);
- ok(ret, "SetBrushOrgEx failed, error %u.\n", GetLastError());
- SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ret = GetBrushOrgEx(child_hdc, &org);
- ok(ret, "GetBrushOrgEx failed, error %u.\n", GetLastError());
- ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
-
- /* Test that WM_CTLCOLORSTATIC changes background mode when dialog texture is on */
- old_mode = SetBkMode(child_hdc, OPAQUE);
- ok(old_mode != 0, "SetBkMode failed.\n");
- SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- mode = SetBkMode(child_hdc, old_mode);
- ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
-
- /* Test that WM_CTLCOLORSTATIC changes background color when dialog texture is on */
- old_color = SetBkColor(child_hdc, 0xaa5511);
- ok(old_color != CLR_INVALID, "SetBkColor failed.\n");
- SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- color = SetBkColor(child_hdc, old_color);
- ok(color == GetSysColor(COLOR_BTNFACE), "Expected background color %#x, got %#x.\n",
- GetSysColor(COLOR_BTNFACE), color);
-
/* Test that dialog doesn't have theme handle opened for itself */
ok(GetWindowTheme(dialog) == NULL, "Expected NULL theme handle.\n");
- /* Test that the returned brush is a pattern brush created from the tab body */
- brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- memset(&log_brush, 0, sizeof(log_brush));
- count = GetObjectA(brush, sizeof(log_brush), &log_brush);
- ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
- ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
- ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
- log_brush.lbStyle);
-
- memset(&bmp, 0, sizeof(bmp));
- count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
- ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
-
theme = OpenThemeData(NULL, L"Tab");
ok(theme != NULL, "OpenThemeData failed.\n");
-
size.cx = 0;
size.cy = 0;
hr = GetThemePartSize(theme, NULL, TABP_BODY, 0, NULL, TS_TRUE, &size);
ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr);
- ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
- ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
-
CloseThemeData(theme);
- /* Test that DefDlgProcA/W() are hooked for WM_CTLCOLORSTATIC */
- brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
- brush2 = (HBRUSH)DefDlgProcW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush2 == brush, "Expected the same brush.\n");
- brush2 = (HBRUSH)DefDlgProcA(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush2 == brush, "Expected the same brush.\n");
+ /* Test which WM_CTLCOLOR* message uses tab background as dialog texture */
+ for (msg = WM_CTLCOLORMSGBOX; msg <= WM_CTLCOLORSTATIC; ++msg)
+ {
+ winetest_push_context("msg %#x", msg);
- /* Test that DefWindowProcA/W() are also hooked for WM_CTLCOLORSTATIC */
- brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
- brush2 = (HBRUSH)DefWindowProcW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
- ok(brush2 == brush, "Expected the same brush.\n");
- brush2 = (HBRUSH)DefWindowProcA(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
- ok(brush2 == brush, "Expected the same brush.\n");
+ /* Test that some WM_CTLCOLOR* messages change brush origin when dialog texture is on */
+ ret = SetBrushOrgEx(child_hdc, 0, 0, NULL);
+ ok(ret, "SetBrushOrgEx failed, error %u.\n", GetLastError());
+ SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ ret = GetBrushOrgEx(child_hdc, &org);
+ ok(ret, "GetBrushOrgEx failed, error %u.\n", GetLastError());
+ /* WM_CTLCOLOREDIT, WM_CTLCOLORLISTBOX and WM_CTLCOLORSCROLLBAR don't use tab background */
+ if (msg == WM_CTLCOLOREDIT || msg == WM_CTLCOLORLISTBOX || msg == WM_CTLCOLORSCROLLBAR)
+ {
+ ok(org.x == 0 && org.y == 0, "Expected (0,0), got %s.\n", wine_dbgstr_point(&org));
+ winetest_pop_context();
+ continue;
+ }
+ else
+ {
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
+ }
+
+ /* Test that some WM_CTLCOLOR* messages change background mode when dialog texture is on */
+ old_mode = SetBkMode(child_hdc, OPAQUE);
+ ok(old_mode != 0, "SetBkMode failed.\n");
+ SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ mode = SetBkMode(child_hdc, old_mode);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
+
+ /* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
+ old_color = SetBkColor(child_hdc, 0xaa5511);
+ ok(old_color != CLR_INVALID, "SetBkColor failed.\n");
+ SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ color = SetBkColor(child_hdc, old_color);
+ ok(color == GetSysColor(COLOR_BTNFACE), "Expected background color %#x, got %#x.\n",
+ GetSysColor(COLOR_BTNFACE), color);
+
+ /* Test that the returned brush is a pattern brush created from the tab body */
+ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ memset(&log_brush, 0, sizeof(log_brush));
+ count = GetObjectA(brush, sizeof(log_brush), &log_brush);
+ ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
+ log_brush.lbStyle);
+
+ memset(&bmp, 0, sizeof(bmp));
+ count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
+
+ /* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
+ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
+ brush2 = (HBRUSH)DefDlgProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ ok(brush2 == brush, "Expected the same brush.\n");
+ brush2 = (HBRUSH)DefDlgProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ ok(brush2 == brush, "Expected the same brush.\n");
+
+ /* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
+ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
+ if (msg != WM_CTLCOLORDLG)
+ {
+ brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ ok(brush2 == brush, "Expected the same brush.\n");
+ brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ ok(brush2 == brush, "Expected the same brush.\n");
+ }
+ else
+ {
+ brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine
+ ok(brush2 != brush, "Expected a different brush.\n");
+ brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine
+ ok(brush2 != brush, "Expected a different brush.\n");
+ }
+
+ winetest_pop_context();
+ }
/* Test that DefWindowProcA/W() are not hooked for WM_ERASEBKGND. So the background is still
* drawn with hbrBackground, which in this case, is GRAY_BRUSH.
--
2.32.0
1
0
Feb. 9, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
programs/schtasks/Makefile.in | 1 -
programs/schtasks/schtasks.c | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/programs/schtasks/Makefile.in b/programs/schtasks/Makefile.in
index 63afc93a876..6eb8d530425 100644
--- a/programs/schtasks/Makefile.in
+++ b/programs/schtasks/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = schtasks.exe
IMPORTS = oleaut32 ole32
diff --git a/programs/schtasks/schtasks.c b/programs/schtasks/schtasks.c
index 340aeaa56fb..c9434801db8 100644
--- a/programs/schtasks/schtasks.c
+++ b/programs/schtasks/schtasks.c
@@ -40,14 +40,14 @@ static ITaskFolder *get_tasks_root_folder(void)
V_VT(&empty) = VT_EMPTY;
hres = ITaskService_Connect(service, empty, empty, empty, empty);
if (FAILED(hres)) {
- FIXME("Connect failed: %08x\n", hres);
+ FIXME("Connect failed: %08lx\n", hres);
return NULL;
}
hres = ITaskService_GetFolder(service, NULL, &root);
ITaskService_Release(service);
if (FAILED(hres)) {
- FIXME("GetFolder failed: %08x\n", hres);
+ FIXME("GetFolder failed: %08lx\n", hres);
return NULL;
}
@@ -70,7 +70,7 @@ static IRegisteredTask *get_registered_task(const WCHAR *name)
SysFreeString(str);
ITaskFolder_Release(root);
if (FAILED(hres)) {
- FIXME("GetTask failed: %08x\n", hres);
+ FIXME("GetTask failed: %08lx\n", hres);
return NULL;
}
@@ -183,7 +183,7 @@ static int change_command(int argc, WCHAR *argv[])
hres = IRegisteredTask_put_Enabled(task, VARIANT_TRUE);
if (FAILED(hres)) {
IRegisteredTask_Release(task);
- FIXME("put_Enabled failed: %08x\n", hres);
+ FIXME("put_Enabled failed: %08lx\n", hres);
return 1;
}
}
1
24
ddraw1 doesn't draw, so presumably not affected. Can't find any crashes in the testbot history
http://test.winehq.org/data/4364ff8d5c0387edd6fae142affe8e844b291518/win81_…
http://test.winehq.org/data/d03984709d87d6eaa0e2e7746f0db5d8fdf81b5a/win150…
I haven't found any examples of ddraw7 crashing in this test. Doesn't mean there aren't any. Let's wait and see.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
---
dlls/ddraw/tests/ddraw2.c | 20 ++++++++++++++------
dlls/ddraw/tests/ddraw4.c | 9 +++++++++
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 625776c652c..1285fa1b682 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -1076,6 +1076,17 @@ static void test_coop_level_d3d_state(void)
window = create_window();
ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n");
+
+ if (ddraw_is_warp(ddraw))
+ {
+ /* ddraw2 crashes in EndScene, and if it doesn't crash it fails with
+ * DDERR_SURFACELOST on WARP. */
+ win_skip("Skipping test that crashes WARP occasionally.\n");
+ IDirectDraw2_Release(ddraw);
+ DestroyWindow(window);
+ return;
+ }
+
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create a 3D device, skipping test.\n");
@@ -1159,12 +1170,9 @@ static void test_coop_level_d3d_state(void)
hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice2_EndScene(device);
- ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#x.\n", hr);
- if (hr == DD_OK)
- {
- color = get_surface_color(rt, 320, 240);
- ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color);
- }
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ color = get_surface_color(rt, 320, 240);
+ ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color);
destroy_viewport(device, viewport);
destroy_material(background);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 9b8acb674e3..6ed12d980db 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -1301,6 +1301,14 @@ static void test_coop_level_d3d_state(void)
hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirect3D3_Release(d3d);
+
+ if (ddraw_is_warp(ddraw))
+ {
+ /* ddraw4 occasionally crashes in GetRenderTarget. */
+ win_skip("Skipping test that crashes WARP occasionally.\n");
+ goto done;
+ }
+
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(rt);
@@ -1349,6 +1357,7 @@ static void test_coop_level_d3d_state(void)
|| broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)),
"Got unexpected color 0x%08x.\n", color);
+done:
destroy_viewport(device, viewport);
IDirectDrawSurface4_Release(surface);
IDirectDrawSurface4_Release(rt);
--
2.34.1
5
13
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/ole32/Makefile.in | 2 +-
dlls/ole32/antimoniker.c | 11 +--
dlls/ole32/bindctx.c | 10 +--
dlls/ole32/classmoniker.c | 18 ++--
dlls/ole32/clipboard.c | 44 ++++-----
dlls/ole32/comcat.c | 6 +-
dlls/ole32/compobj.c | 8 +-
dlls/ole32/compositemoniker.c | 44 ++++-----
dlls/ole32/datacache.c | 25 +++---
dlls/ole32/defaulthandler.c | 37 ++++----
dlls/ole32/filelockbytes.c | 12 +--
dlls/ole32/filemoniker.c | 6 +-
dlls/ole32/git.c | 14 +--
dlls/ole32/itemmoniker.c | 18 ++--
dlls/ole32/memlockbytes.c | 6 +-
dlls/ole32/moniker.c | 28 +++---
dlls/ole32/ole2.c | 52 +++++------
dlls/ole32/ole2stubs.c | 4 +-
dlls/ole32/oleobj.c | 33 +++----
dlls/ole32/pointermoniker.c | 32 +++----
dlls/ole32/stg_prop.c | 104 +++++++++++-----------
dlls/ole32/stg_stream.c | 26 +++---
dlls/ole32/storage32.c | 162 ++++++++++++++++------------------
dlls/ole32/usrmarshal.c | 89 +++++++++----------
24 files changed, 375 insertions(+), 416 deletions(-)
diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in
index e0e4bc74c1f..340ffdbded2 100644
--- a/dlls/ole32/Makefile.in
+++ b/dlls/ole32/Makefile.in
@@ -2,7 +2,7 @@ MODULE = ole32.dll
IMPORTLIB = ole32
IMPORTS = uuid advapi32 user32 gdi32 combase rpcrt4 kernelbase
DELAYIMPORTS = oleaut32
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_OLE32_
+EXTRADEFS = -D_OLE32_
C_SRCS = \
antimoniker.c \
diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c
index 28c4dd91ac5..2a7be8e75cc 100644
--- a/dlls/ole32/antimoniker.c
+++ b/dlls/ole32/antimoniker.c
@@ -122,7 +122,7 @@ static ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker *iface)
AntiMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -135,7 +135,7 @@ static ULONG WINAPI AntiMonikerImpl_Release(IMoniker *iface)
AntiMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -261,14 +261,11 @@ AntiMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
return E_NOTIMPL;
}
-/******************************************************************************
- * AntiMoniker_Reduce
- ******************************************************************************/
static HRESULT WINAPI
AntiMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -556,7 +553,7 @@ AntiMonikerROTDataImpl_GetComparisonData(IROTData *iface, BYTE *data, ULONG data
{
AntiMonikerImpl *moniker = impl_from_IROTData(iface);
- TRACE("%p, %p, %u, %p.\n", iface, data, data_len, data_req);
+ TRACE("%p, %p, %lu, %p.\n", iface, data, data_len, data_req);
*data_req = sizeof(CLSID) + sizeof(DWORD);
if (data_len < *data_req)
diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c
index 261c6b01c67..360464d13c5 100644
--- a/dlls/ole32/bindctx.c
+++ b/dlls/ole32/bindctx.c
@@ -118,7 +118,7 @@ static ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface)
BindCtxImpl *context = impl_from_IBindCtx(iface);
ULONG refcount = InterlockedDecrement(&context->ref);
- TRACE("%p refcount %d.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -234,7 +234,7 @@ BindCtxImpl_SetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
if (pbindopts->cbStruct > sizeof(This->options))
{
- WARN("invalid size %u.\n", pbindopts->cbStruct);
+ WARN("invalid size %lu.\n", pbindopts->cbStruct);
return E_INVALIDARG;
}
memcpy(&This->options, pbindopts, pbindopts->cbStruct);
@@ -492,7 +492,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
{
BindCtxImpl *object;
- TRACE("%#x, %p\n", reserved, bind_context);
+ TRACE("%#lx, %p.\n", reserved, bind_context);
if (!bind_context) return E_INVALIDARG;
@@ -500,7 +500,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
if (reserved)
{
- WARN("reserved should be 0, not 0x%x\n", reserved);
+ WARN("reserved should be 0, not %#lx.\n", reserved);
return E_INVALIDARG;
}
@@ -539,7 +539,7 @@ HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID riid, LPVOID * pp
HRESULT res;
IBindCtx * pbc;
- TRACE("(%p, %x, %s, %p)\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
+ TRACE("%p, %lx, %s, %p.\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
res = CreateBindCtx(grfOpt, &pbc);
if (SUCCEEDED(res))
diff --git a/dlls/ole32/classmoniker.c b/dlls/ole32/classmoniker.c
index 8fe60c6ba71..6199a5a5182 100644
--- a/dlls/ole32/classmoniker.c
+++ b/dlls/ole32/classmoniker.c
@@ -133,7 +133,7 @@ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface)
ClassMoniker *moniker = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&moniker->ref);
- TRACE("%p refcount %d\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -190,7 +190,7 @@ static HRESULT WINAPI ClassMoniker_Load(IMoniker *iface, IStream *stream)
heap_free(moniker->data);
if (!(moniker->data = heap_alloc(moniker->header.data_len)))
{
- WARN("Failed to allocate moniker data of size %u.\n", moniker->header.data_len);
+ WARN("Failed to allocate moniker data of size %lu.\n", moniker->header.data_len);
moniker->header.data_len = 0;
return E_OUTOFMEMORY;
}
@@ -278,16 +278,10 @@ static HRESULT WINAPI ClassMoniker_BindToStorage(IMoniker* iface,
return IMoniker_BindToObject(iface, pbc, pmkToLeft, riid, ppvResult);
}
-/******************************************************************************
- * ClassMoniker_Reduce
- ******************************************************************************/
-static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface,
- IBindCtx* pbc,
- DWORD dwReduceHowFar,
- IMoniker** ppmkToLeft,
- IMoniker** ppmkReduced)
+static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface, IBindCtx *pbc,
+ DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (!ppmkReduced)
return E_POINTER;
@@ -547,7 +541,7 @@ static HRESULT WINAPI ClassMonikerROTData_GetComparisonData(IROTData* iface,
{
ClassMoniker *This = impl_from_IROTData(iface);
- TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
+ TRACE("%p, %p, %lu, %p.\n", iface, pbData, cbMax, pcbData);
*pcbData = 2*sizeof(CLSID);
if (cbMax < *pcbData)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 1cad47a6a47..5d1be63a3f7 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -277,7 +277,7 @@ static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd)
static inline const char *dump_fmtetc(FORMATETC *fmt)
{
if (!fmt) return "(null)";
- return wine_dbg_sprintf("cf %04x ptd %p aspect %x lindex %d tymed %x",
+ return wine_dbg_sprintf("cf %04x ptd %p aspect %lx lindex %ld tymed %lx",
fmt->cfFormat, fmt->ptd, fmt->dwAspect, fmt->lindex, fmt->tymed);
}
@@ -338,9 +338,11 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_QueryInterface
static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- TRACE("(%p)->(count=%u)\n",This, This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
- return InterlockedIncrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ return ref;
}
/************************************************************************
@@ -351,11 +353,10 @@ static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_Release(LPENUMFORMATETC iface)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- ULONG ref;
+ ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(count=%u)\n",This, This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- ref = InterlockedDecrement(&This->ref);
if (!ref)
{
TRACE("() - destroying IEnumFORMATETC(%p)\n",This);
@@ -415,7 +416,7 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Next
static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Skip(LPENUMFORMATETC iface, ULONG celt)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- TRACE("(%p)->(num=%u)\n", This, celt);
+ TRACE("%p, %lu.\n", iface, celt);
This->pos += celt;
if (This->pos > This->data->count)
@@ -650,7 +651,7 @@ static HRESULT render_embed_source_hack(IDataObject *data, LPFORMATETC fmt)
if (FAILED(hr = IDataObject_GetDataHere(theOleClipboard->src_data, fmt, &std)))
{
- WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%x)\n", hr);
+ WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%lx)\n", hr);
GlobalFree(hStorage);
return hr;
}
@@ -1025,7 +1026,7 @@ static HRESULT render_format(IDataObject *data, LPFORMATETC fmt)
}
else
{
- FIXME("Unhandled tymed %x\n", fmt->tymed);
+ FIXME("Unhandled tymed %lx\n", fmt->tymed);
hr = DV_E_FORMATETC;
}
@@ -1089,10 +1090,11 @@ static HRESULT WINAPI snapshot_QueryInterface(IDataObject *iface,
static ULONG WINAPI snapshot_AddRef(IDataObject *iface)
{
snapshot *This = impl_from_IDataObject(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(count=%u)\n", This, This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- return InterlockedIncrement(&This->ref);
+ return ref;
}
/************************************************************************
@@ -1101,11 +1103,9 @@ static ULONG WINAPI snapshot_AddRef(IDataObject *iface)
static ULONG WINAPI snapshot_Release(IDataObject *iface)
{
snapshot *This = impl_from_IDataObject(iface);
- ULONG ref;
-
- TRACE("(%p)->(count=%u)\n", This, This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
- ref = InterlockedDecrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0)
{
@@ -1263,7 +1263,7 @@ static HRESULT get_priv_data(ole_priv_data **data)
else
TRACE("cf %04x\n", cf);
}
- TRACE("count %d\n", count);
+ TRACE("count %ld\n", count);
size += count * sizeof(ret->entries[0]);
/* There are holes in fmtetc so zero init */
@@ -1532,7 +1532,7 @@ static HRESULT WINAPI snapshot_GetData(IDataObject *iface, FORMATETC *fmt,
hr = get_stgmed_for_bitmap((HBITMAP)h, med);
else
{
- FIXME("Unhandled tymed - mask %x req tymed %x\n", mask, fmt->tymed);
+ FIXME("Unhandled tymed - mask %lx req tymed %lx\n", mask, fmt->tymed);
hr = E_FAIL;
goto end;
}
@@ -1558,7 +1558,7 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
if ( !fmt || !med ) return E_INVALIDARG;
- TRACE("(%p, %p {%s}, %p (tymed %x)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
+ TRACE("%p, %p {%s}, %p (tymed %lx)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
if ( !OpenClipboard(NULL)) return CLIPBRD_E_CANT_OPEN;
@@ -1642,7 +1642,7 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
break;
}
default:
- FIXME("Unhandled tymed - supported %x req tymed %x\n", supported, med->tymed);
+ FIXME("Unhandled tymed - supported %x req tymed %lx\n", supported, med->tymed);
hr = E_FAIL;
goto end;
}
@@ -1710,7 +1710,7 @@ static HRESULT WINAPI snapshot_EnumFormatEtc(IDataObject *iface, DWORD dir,
HRESULT hr;
ole_priv_data *data = NULL;
- TRACE("(%p, %x, %p)\n", iface, dir, enum_fmt);
+ TRACE("%p, %lx, %p.\n", iface, dir, enum_fmt);
*enum_fmt = NULL;
@@ -1737,7 +1737,7 @@ static HRESULT WINAPI snapshot_DAdvise(IDataObject *iface, FORMATETC *fmt,
DWORD flags, IAdviseSink *sink,
DWORD *conn)
{
- TRACE("(%p, %p, %x, %p, %p): not implemented\n", iface, fmt, flags, sink, conn);
+ TRACE("%p, %p, %lx, %p, %p.\n", iface, fmt, flags, sink, conn);
return E_NOTIMPL;
}
@@ -1748,7 +1748,7 @@ static HRESULT WINAPI snapshot_DAdvise(IDataObject *iface, FORMATETC *fmt,
*/
static HRESULT WINAPI snapshot_DUnadvise(IDataObject* iface, DWORD conn)
{
- TRACE("(%p, %d): not implemented\n", iface, conn);
+ TRACE("%p, %ld.\n", iface, conn);
return E_NOTIMPL;
}
diff --git a/dlls/ole32/comcat.c b/dlls/ole32/comcat.c
index 0b97b00d908..ad7e8a4b076 100644
--- a/dlls/ole32/comcat.c
+++ b/dlls/ole32/comcat.c
@@ -505,7 +505,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_GetCategoryDesc(
HKEY key;
HRESULT res;
- TRACE("CATID: %s LCID: %x\n",debugstr_guid(rcatid), lcid);
+ TRACE("CATID: %s LCID: %lx\n",debugstr_guid(rcatid), lcid);
if (rcatid == NULL || ppszDesc == NULL) return E_INVALIDARG;
@@ -589,10 +589,10 @@ static HRESULT WINAPI COMCAT_ICatInformation_IsClassOfCategories(
if (TRACE_ON(ole)) {
ULONG count;
- TRACE("CLSID: %s Implemented %u\n",debugstr_guid(rclsid),cImplemented);
+ TRACE("CLSID: %s Implemented %lu\n",debugstr_guid(rclsid),cImplemented);
for (count = 0; count < cImplemented; ++count)
TRACE(" %s\n",debugstr_guid(&rgcatidImpl[count]));
- TRACE("Required %u\n",cRequired);
+ TRACE("Required %lu\n",cRequired);
for (count = 0; count < cRequired; ++count)
TRACE(" %s\n",debugstr_guid(&rgcatidReq[count]));
}
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index aafc4cf19f8..8d2591c1211 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -373,7 +373,7 @@ static ULONG WINAPI ISynchronize_fnAddRef(ISynchronize *iface)
{
MREImpl *This = impl_from_ISynchronize(iface);
LONG ref = InterlockedIncrement(&This->ref);
- TRACE("%p - ref %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -382,7 +382,7 @@ static ULONG WINAPI ISynchronize_fnRelease(ISynchronize *iface)
{
MREImpl *This = impl_from_ISynchronize(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("%p - ref %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if(!ref)
{
@@ -397,7 +397,7 @@ static HRESULT WINAPI ISynchronize_fnWait(ISynchronize *iface, DWORD dwFlags, DW
{
MREImpl *This = impl_from_ISynchronize(iface);
DWORD index;
- TRACE("%p (%08x, %08x)\n", This, dwFlags, dwMilliseconds);
+ TRACE("%p, %#lx, %#lx.\n", iface, dwFlags, dwMilliseconds);
return CoWaitForMultipleHandles(dwFlags, dwMilliseconds, 1, &This->event, &index);
}
@@ -929,7 +929,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved)
{
- TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, reserved);
+ TRACE("%p, %#lx, %p.\n", hinstDLL, fdwReason, reserved);
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index a94e4734f45..84099cee6d6 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -147,7 +147,7 @@ static ULONG WINAPI CompositeMonikerImpl_Release(IMoniker* iface)
CompositeMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->ref);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
if (!refcount)
{
@@ -205,13 +205,13 @@ static HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker *iface, IStream *stream
hr = IStream_Read(stream, &count, sizeof(DWORD), NULL);
if (hr != S_OK)
{
- WARN("Failed to read component count, hr %#x.\n", hr);
+ WARN("Failed to read component count, hr %#lx.\n", hr);
return hr;
}
if (count < 2)
{
- WARN("Unexpected component count %u.\n", count);
+ WARN("Unexpected component count %lu.\n", count);
return E_UNEXPECTED;
}
@@ -222,7 +222,7 @@ static HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker *iface, IStream *stream
{
if (FAILED(hr = OleLoadFromStream(stream, &IID_IMoniker, (void **)&m)))
{
- WARN("Failed to initialize component %u, hr %#x.\n", i, hr);
+ WARN("Failed to initialize component %lu, hr %#lx.\n", i, hr);
IMoniker_Release(last);
return hr;
}
@@ -416,7 +416,7 @@ static HRESULT WINAPI CompositeMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc
BOOL was_reduced;
HRESULT hr;
- TRACE("%p, %p, %d, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
if (!pbc || !reduced)
return E_INVALIDARG;
@@ -1021,7 +1021,7 @@ static HRESULT composite_get_moniker_comparison_data(IMoniker *moniker,
if (FAILED(hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rot_data)))
{
- WARN("Failed to get IROTData for component moniker, hr %#x.\n", hr);
+ WARN("Failed to get IROTData for component moniker, hr %#lx.\n", hr);
return hr;
}
@@ -1038,7 +1038,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
HRESULT hr;
ULONG len;
- TRACE("%p, %p, %u, %p\n", iface, data, max_len, ret_len);
+ TRACE("%p, %p, %lu, %p\n", iface, data, max_len, ret_len);
if (!moniker->comp_count)
return E_UNEXPECTED;
@@ -1052,7 +1052,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
*ret_len += len;
else
{
- WARN("Failed to get comparison data length for left component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data length for left component, hr %#lx.\n", hr);
return hr;
}
@@ -1062,7 +1062,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
*ret_len += len;
else
{
- WARN("Failed to get comparison data length for right component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data length for right component, hr %#lx.\n", hr);
return hr;
}
@@ -1074,14 +1074,14 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
max_len -= sizeof(CLSID);
if (FAILED(hr = composite_get_moniker_comparison_data(moniker->left, data, max_len, &len)))
{
- WARN("Failed to get comparison data for left component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data for left component, hr %#lx.\n", hr);
return hr;
}
data += len;
max_len -= len;
if (FAILED(hr = composite_get_moniker_comparison_data(moniker->right, data, max_len, &len)))
{
- WARN("Failed to get comparison data for right component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data for right component, hr %#lx.\n", hr);
return hr;
}
@@ -1121,7 +1121,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_GetUnmarshalClass(
{
CompositeMonikerImpl *This = impl_from_IMarshal(iface);
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid);
return IMoniker_GetClassID(&This->IMoniker_iface, pCid);
@@ -1135,7 +1135,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_GetMarshalSizeMax(
HRESULT hr;
ULONG size;
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pSize);
if (!moniker->comp_count)
@@ -1166,19 +1166,19 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_MarshalInterface(IMarshal *ifa
CompositeMonikerImpl *moniker = impl_from_IMarshal(iface);
HRESULT hr;
- TRACE("%p, %p, %s, %p, %x, %p, %#x\n", iface, stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, flags);
+ TRACE("%p, %p, %s, %p, %lx, %p, %#lx\n", iface, stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, flags);
if (!moniker->comp_count)
return E_UNEXPECTED;
if (FAILED(hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker->left, dwDestContext, pvDestContext, flags)))
{
- WARN("Failed to marshal left component, hr %#x.\n", hr);
+ WARN("Failed to marshal left component, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker->right, dwDestContext, pvDestContext, flags)))
- WARN("Failed to marshal right component, hr %#x.\n", hr);
+ WARN("Failed to marshal right component, hr %#lx.\n", hr);
return hr;
}
@@ -1205,13 +1205,13 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_UnmarshalInterface(IMarshal *i
if (FAILED(hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker->left)))
{
- WARN("Failed to unmarshal left moniker, hr %#x.\n", hr);
+ WARN("Failed to unmarshal left moniker, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker->right)))
{
- WARN("Failed to unmarshal right moniker, hr %#x.\n", hr);
+ WARN("Failed to unmarshal right moniker, hr %#lx.\n", hr);
return hr;
}
@@ -1229,7 +1229,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_ReleaseMarshalData(IMarshal *i
static HRESULT WINAPI CompositeMonikerMarshalImpl_DisconnectObject(IMarshal *iface,
DWORD dwReserved)
{
- TRACE("(0x%x)\n", dwReserved);
+ TRACE("%#lx\n", dwReserved);
/* can't disconnect a state-based marshal as nothing on server side to
* disconnect from */
return S_OK;
@@ -1286,7 +1286,7 @@ static ULONG WINAPI EnumMonikerImpl_Release(IEnumMoniker *iface)
ULONG refcount = InterlockedDecrement(&e->ref);
unsigned int i;
- TRACE("%p, refcount %d.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1305,7 +1305,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker *iface, ULONG count,
EnumMonikerImpl *e = impl_from_IEnumMoniker(iface);
unsigned int i;
- TRACE("%p, %u, %p, %p.\n", iface, count, m, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, count, m, fetched);
if (!m)
return E_INVALIDARG;
@@ -1329,7 +1329,7 @@ static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker *iface, ULONG count)
{
EnumMonikerImpl *e = impl_from_IEnumMoniker(iface);
- TRACE("%p, %u.\n", iface, count);
+ TRACE("%p, %lu.\n", iface, count);
if (!count)
return S_OK;
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index a536f829515..e6cea25aca6 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -215,7 +215,7 @@ static inline DataCache *impl_from_IAdviseSink( IAdviseSink *iface )
const char *debugstr_formatetc(const FORMATETC *formatetc)
{
- return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %d, lindex = %d, tymed = %d }",
+ return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %ld, lindex = %ld, tymed = %ld }",
formatetc->cfFormat, formatetc->ptd, formatetc->dwAspect,
formatetc->lindex, formatetc->tymed);
}
@@ -353,7 +353,7 @@ static HRESULT check_valid_formatetc( const FORMATETC *fmt )
return CACHE_S_FORMATETC_NOTSUPPORTED;
else
{
- WARN("invalid clipformat/tymed combination: %d/%d\n", fmt->cfFormat, fmt->tymed);
+ WARN("invalid clipformat/tymed combination: %d/%ld\n", fmt->cfFormat, fmt->tymed);
return DV_E_TYMED;
}
}
@@ -427,7 +427,7 @@ static void DataCache_FireOnViewChange(
DWORD aspect,
LONG lindex)
{
- TRACE("(%p, %x, %d)\n", this, aspect, lindex);
+ TRACE("%p, %lx, %ld.\n", this, aspect, lindex);
/*
* The sink supplies a filter when it registers
@@ -2018,7 +2018,7 @@ static HRESULT WINAPI DataCache_Draw(
HRESULT hres;
DataCacheEntry *cache_entry;
- TRACE("(%p, %x, %d, %p, %p, %p, %p, %p, %p, %lx)\n",
+ TRACE("%p, %lx, %ld, %p, %p, %p, %p, %p, %p, %Ix.\n",
iface,
dwDrawAspect,
lindex,
@@ -2184,7 +2184,7 @@ static HRESULT WINAPI DataCache_SetAdvise(
{
DataCache *this = impl_from_IViewObject2(iface);
- TRACE("(%p, %x, %x, %p)\n", iface, aspects, advf, pAdvSink);
+ TRACE("%p, %lx, %lx, %p.\n", iface, aspects, advf, pAdvSink);
/*
* A call to this function removes the previous sink
@@ -2274,8 +2274,7 @@ static HRESULT WINAPI DataCache_GetExtent(
HRESULT hres = E_FAIL;
DataCacheEntry *cache_entry;
- TRACE("(%p, %x, %d, %p, %p)\n",
- iface, dwDrawAspect, lindex, ptd, lpsizel);
+ TRACE("%p, %lx, %ld, %p, %p.\n", iface, dwDrawAspect, lindex, ptd, lpsizel);
if (lpsizel==NULL)
return E_POINTER;
@@ -2284,7 +2283,7 @@ static HRESULT WINAPI DataCache_GetExtent(
lpsizel->cy = 0;
if (lindex!=-1)
- FIXME("Unimplemented flag lindex = %d\n", lindex);
+ FIXME("Unimplemented flag lindex = %ld\n", lindex);
/*
* Right now, we support only the callback from
@@ -2445,7 +2444,7 @@ static HRESULT WINAPI DataCache_Cache(
HRESULT hr;
FORMATETC fmt_cpy;
- TRACE("(%p, 0x%x, %p)\n", pformatetc, advf, pdwConnection);
+ TRACE("%p, %#lx, %p.\n", pformatetc, advf, pdwConnection);
if (!pformatetc || !pdwConnection)
return E_INVALIDARG;
@@ -2496,7 +2495,7 @@ static HRESULT WINAPI DataCache_Uncache(
DataCache *This = impl_from_IOleCache2(iface);
DataCacheEntry *cache_entry;
- TRACE("(%d)\n", dwConnection);
+ TRACE("%ld\n", dwConnection);
LIST_FOR_EACH_ENTRY(cache_entry, &This->cache_list, DataCacheEntry, entry)
if (cache_entry->id == dwConnection)
@@ -2505,7 +2504,7 @@ static HRESULT WINAPI DataCache_Uncache(
return S_OK;
}
- WARN("no connection found for %d\n", dwConnection);
+ WARN("no connection found for %ld\n", dwConnection);
return OLE_E_NOCONNECTION;
}
@@ -2626,7 +2625,7 @@ static HRESULT WINAPI DataCache_UpdateCache( IOleCache2 *iface, IDataObject *dat
int i, slots = 0;
BOOL done_one = FALSE;
- TRACE( "(%p %p %08x %p)\n", iface, data, mode, reserved );
+ TRACE("%p, %p, %#lx, %p.\n", iface, data, mode, reserved );
LIST_FOR_EACH_ENTRY( cache_entry, &This->cache_list, DataCacheEntry, entry )
{
@@ -2705,7 +2704,7 @@ static HRESULT WINAPI DataCache_DiscardCache(
DataCacheEntry *cache_entry;
HRESULT hr = S_OK;
- TRACE("(%d)\n", dwDiscardOptions);
+ TRACE("%ld\n", dwDiscardOptions);
if (dwDiscardOptions == DISCARDCACHE_SAVEIFDIRTY)
hr = DataCache_Save(&This->IPersistStorage_iface, This->presentationStorage, TRUE);
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index 81ffa1e6dbc..b69a054b572 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -519,7 +519,7 @@ static HRESULT WINAPI DefaultHandler_Close(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%d)\n", dwSaveOption);
+ TRACE("%ld\n", dwSaveOption);
if (!object_is_running(This))
return S_OK;
@@ -548,7 +548,7 @@ static HRESULT WINAPI DefaultHandler_SetMoniker(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = S_OK;
- TRACE("(%p, %d, %p)\n", iface, dwWhichMoniker, pmk);
+ TRACE("%p, %ld, %p.\n", iface, dwWhichMoniker, pmk);
if (object_is_running(This))
{
@@ -576,8 +576,7 @@ static HRESULT WINAPI DefaultHandler_GetMoniker(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%p, %d, %d, %p)\n",
- iface, dwAssign, dwWhichMoniker, ppmk);
+ TRACE("%p, %ld, %ld, %p.\n", iface, dwAssign, dwWhichMoniker, ppmk);
if (object_is_running(This))
{
@@ -617,8 +616,7 @@ static HRESULT WINAPI DefaultHandler_InitFromData(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %p, %d, %d)\n",
- iface, pDataObject, fCreation, dwReserved);
+ TRACE("%p, %p, %d, %ld.\n", iface, pDataObject, fCreation, dwReserved);
if (object_is_running(This))
{
@@ -646,8 +644,7 @@ static HRESULT WINAPI DefaultHandler_GetClipboardData(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %d, %p)\n",
- iface, dwReserved, ppDataObject);
+ TRACE("%p, %ld, %p.\n", iface, dwReserved, ppDataObject);
if (object_is_running(This))
{
@@ -673,7 +670,7 @@ static HRESULT WINAPI DefaultHandler_DoVerb(
IRunnableObject *pRunnableObj = &This->IRunnableObject_iface;
HRESULT hr;
- TRACE("(%d, %p, %p, %d, %p, %s)\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect));
+ TRACE("%ld, %p, %p, %ld, %p, %s.\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect));
hr = IRunnableObject_Run(pRunnableObj, NULL);
if (FAILED(hr)) return hr;
@@ -809,7 +806,7 @@ static HRESULT WINAPI DefaultHandler_GetUserType(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, dwFormOfType, pszUserType);
+ TRACE("%p, %ld, %p.\n", iface, dwFormOfType, pszUserType);
if (object_is_running(This))
{
start_object_call( This );
@@ -836,8 +833,7 @@ static HRESULT WINAPI DefaultHandler_SetExtent(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %x, (%d x %d))\n", iface,
- dwDrawAspect, psizel->cx, psizel->cy);
+ TRACE("%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect, psizel->cx, psizel->cy);
if (object_is_running(This))
{
@@ -868,7 +864,7 @@ static HRESULT WINAPI DefaultHandler_GetExtent(
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwDrawAspect, psizel);
+ TRACE("%p, %lx, %p.\n", iface, dwDrawAspect, psizel);
if (object_is_running(This))
{
@@ -947,7 +943,7 @@ static HRESULT WINAPI DefaultHandler_Unadvise(
{
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %d)\n", iface, dwConnection);
+ TRACE("%p, %ld.\n", iface, dwConnection);
/*
* If we don't have an advise holder yet, it means we don't have
@@ -1003,7 +999,7 @@ static HRESULT WINAPI DefaultHandler_GetMiscStatus(
HRESULT hres;
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwAspect, pdwStatus);
+ TRACE("%p, %lx, %p.\n", iface, dwAspect, pdwStatus);
if (object_is_running(This))
{
@@ -1278,7 +1274,7 @@ static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
{
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwDirection, ppenumFormatEtc);
+ TRACE("%p, %lx, %p.\n", iface, dwDirection, ppenumFormatEtc);
return OleRegEnumFormatEtc(&This->clsid, dwDirection, ppenumFormatEtc);
}
@@ -1301,8 +1297,7 @@ static HRESULT WINAPI DefaultHandler_DAdvise(
HRESULT hres = S_OK;
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %p, %d, %p, %p)\n",
- iface, pformatetc, advf, pAdvSink, pdwConnection);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pformatetc, advf, pAdvSink, pdwConnection);
/* Make sure we have a data advise holder before we start. */
if (!This->dataAdviseHolder)
@@ -1341,7 +1336,7 @@ static HRESULT WINAPI DefaultHandler_DUnadvise(
{
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %d)\n", iface, dwConnection);
+ TRACE("%p, %ld.\n", iface, dwConnection);
/*
* If we don't have a data advise holder yet, it means that
@@ -2154,7 +2149,7 @@ static DefaultHandler* DefaultHandler_Construct(
if (SUCCEEDED(hr))
This->object_state = object_state_running;
if (FAILED(hr))
- WARN("object creation failed with error %08x\n", hr);
+ WARN("object creation failed with error %#lx\n", hr);
}
else
{
@@ -2241,7 +2236,7 @@ HRESULT WINAPI OleCreateEmbeddingHelper(
DefaultHandler* newHandler = NULL;
HRESULT hr = S_OK;
- TRACE("(%s, %p, %08x, %p, %s, %p)\n", debugstr_guid(clsid), pUnkOuter, flags, pCF, debugstr_guid(riid), ppvObj);
+ TRACE("%s, %p, %#lx, %p, %s, %p.\n", debugstr_guid(clsid), pUnkOuter, flags, pCF, debugstr_guid(riid), ppvObj);
if (!ppvObj)
return E_POINTER;
diff --git a/dlls/ole32/filelockbytes.c b/dlls/ole32/filelockbytes.c
index e9699c01650..072314046a6 100644
--- a/dlls/ole32/filelockbytes.c
+++ b/dlls/ole32/filelockbytes.c
@@ -189,7 +189,7 @@ static HRESULT WINAPI FileLockBytesImpl_ReadAt(
LARGE_INTEGER offset;
ULONG cbRead;
- TRACE("(%p)-> %i %p %i %p\n",This, ulOffset.u.LowPart, pv, cb, pcbRead);
+ TRACE("%p, %ld, %p, %lu, %p.\n", iface, ulOffset.u.LowPart, pv, cb, pcbRead);
/* verify a sane environment */
if (!This) return E_FAIL;
@@ -244,7 +244,7 @@ static HRESULT WINAPI FileLockBytesImpl_WriteAt(
LARGE_INTEGER offset;
ULONG cbWritten;
- TRACE("(%p)-> %i %p %i %p\n",This, ulOffset.u.LowPart, pv, cb, pcbWritten);
+ TRACE("%p, %ld, %p, %lu, %p.\n", iface, ulOffset.u.LowPart, pv, cb, pcbWritten);
/* verify a sane environment */
if (!This) return E_FAIL;
@@ -297,7 +297,7 @@ static HRESULT WINAPI FileLockBytesImpl_SetSize(ILockBytes* iface, ULARGE_INTEGE
HRESULT hr = S_OK;
LARGE_INTEGER newpos;
- TRACE("new size %u\n", newSize.u.LowPart);
+ TRACE("new size %lu\n", newSize.u.LowPart);
newpos.QuadPart = newSize.QuadPart;
if (SetFilePointerEx(This->hfile, newpos, NULL, FILE_BEGIN))
@@ -316,7 +316,7 @@ static HRESULT get_lock_error(void)
case ERROR_ACCESS_DENIED: return STG_E_ACCESSDENIED; break;
case ERROR_NOT_SUPPORTED: return STG_E_INVALIDFUNCTION; break;
default:
- FIXME("no mapping for error %d\n", GetLastError());
+ FIXME("no mapping for error %ld\n", GetLastError());
return STG_E_INVALIDFUNCTION;
}
}
@@ -328,7 +328,7 @@ static HRESULT WINAPI FileLockBytesImpl_LockRegion(ILockBytes* iface,
OVERLAPPED ol;
DWORD lock_flags = LOCKFILE_FAIL_IMMEDIATELY;
- TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("ofs %lu count %lu flags %lx\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
if (dwLockType & LOCK_WRITE)
return STG_E_INVALIDFUNCTION;
@@ -351,7 +351,7 @@ static HRESULT WINAPI FileLockBytesImpl_UnlockRegion(ILockBytes* iface,
FileLockBytesImpl* This = impl_from_ILockBytes(iface);
OVERLAPPED ol;
- TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("ofs %lu count %lu flags %lx\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
if (dwLockType & LOCK_WRITE)
return STG_E_INVALIDFUNCTION;
diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c
index 794b4507942..9b64d0e43e9 100644
--- a/dlls/ole32/filemoniker.c
+++ b/dlls/ole32/filemoniker.c
@@ -129,7 +129,7 @@ static ULONG WINAPI FileMonikerImpl_Release(IMoniker* iface)
FileMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&moniker->ref);
- TRACE("(%p, refcount %d)\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -611,7 +611,7 @@ FileMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
static HRESULT WINAPI FileMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD howfar,
IMoniker **toleft, IMoniker **reduced)
{
- TRACE("%p, %p, %d, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
if (!pbc || !reduced)
return E_INVALIDARG;
@@ -1233,7 +1233,7 @@ FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
int i;
LPWSTR pszFileName;
- TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
+ TRACE("%p, %p, %lu, %p.\n", iface, pbData, cbMax, pcbData);
*pcbData = sizeof(CLSID) + len * sizeof(WCHAR);
if (cbMax < *pcbData)
diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c
index fe6b5e58122..50848a2a020 100644
--- a/dlls/ole32/git.c
+++ b/dlls/ole32/git.c
@@ -95,7 +95,7 @@ static StdGITEntry* StdGlobalInterfaceTable_FindEntry(StdGlobalInterfaceTableImp
{
StdGITEntry* e;
- TRACE("This=%p, cookie=0x%x\n", This, cookie);
+ TRACE("%p, %#lx.\n", This, cookie);
LIST_FOR_EACH_ENTRY(e, &This->list, StdGITEntry, entry) {
if (e->cookie == cookie)
@@ -205,7 +205,7 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal(
LeaveCriticalSection(&git_section);
- TRACE("Cookie is 0x%x\n", entry->cookie);
+ TRACE("Cookie is %#lx\n", entry->cookie);
return S_OK;
}
@@ -217,7 +217,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
StdGITEntry* entry;
HRESULT hr;
- TRACE("iface=%p, dwCookie=0x%x\n", iface, dwCookie);
+ TRACE("%p, %#lx.\n", iface, dwCookie);
EnterCriticalSection(&git_section);
@@ -236,7 +236,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
hr = CoReleaseMarshalData(entry->stream);
if (hr != S_OK)
{
- WARN("Failed to release marshal data, hr = 0x%08x\n", hr);
+ WARN("Failed to release marshal data, hr = %#lx\n", hr);
return hr;
}
IStream_Release(entry->stream);
@@ -255,13 +255,13 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
HRESULT hres;
IStream *stream;
- TRACE("dwCookie=0x%x, riid=%s, ppv=%p\n", dwCookie, debugstr_guid(riid), ppv);
+ TRACE("%#lx, %s, %p.\n", dwCookie, debugstr_guid(riid), ppv);
EnterCriticalSection(&git_section);
entry = StdGlobalInterfaceTable_FindEntry(This, dwCookie);
if (entry == NULL) {
- WARN("Entry for cookie 0x%x not found\n", dwCookie);
+ WARN("Entry for cookie %#lx not found\n", dwCookie);
LeaveCriticalSection(&git_section);
return E_INVALIDARG;
}
@@ -273,7 +273,7 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
LeaveCriticalSection(&git_section);
if (hres != S_OK) {
- WARN("Failed to clone stream with error 0x%08x\n", hres);
+ WARN("Failed to clone stream with error %#lx.\n", hres);
return hres;
}
diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c
index 1ab9c52dbfb..112a8db4b16 100644
--- a/dlls/ole32/itemmoniker.c
+++ b/dlls/ole32/itemmoniker.c
@@ -198,7 +198,7 @@ static ULONG WINAPI ItemMonikerImpl_Release(IMoniker* iface)
ItemMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->ref);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -286,7 +286,7 @@ static HRESULT item_moniker_load_string_record(IStream *stream, WCHAR **ret)
if (str_len % sizeof(WCHAR))
{
- WARN("Unexpected Unicode name length %d.\n", str_len);
+ WARN("Unexpected Unicode name length %ld.\n", str_len);
hr = E_FAIL;
goto end;
}
@@ -491,16 +491,10 @@ static HRESULT WINAPI ItemMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx *p
return hr;
}
-/******************************************************************************
- * ItemMoniker_Reduce
- ******************************************************************************/
-static HRESULT WINAPI ItemMonikerImpl_Reduce(IMoniker* iface,
- IBindCtx* pbc,
- DWORD dwReduceHowFar,
- IMoniker** ppmkToLeft,
- IMoniker** ppmkReduced)
+static HRESULT WINAPI ItemMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc,
+ DWORD dwReduceHowFar, IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -864,7 +858,7 @@ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData *iface,
int delim_len, i;
WCHAR *ptrW;
- TRACE("(%p, %p, %u, %p)\n", iface, buffer, max_len, data_len);
+ TRACE("%p, %p, %lu, %p.\n", iface, buffer, max_len, data_len);
delim_len = This->itemDelimiter && This->itemDelimiter[0] ? lstrlenW(This->itemDelimiter) : 0;
*data_len = sizeof(CLSID) + sizeof(WCHAR) + (delim_len + name_len) * sizeof(WCHAR);
diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c
index 2d7d4572584..f974e4229eb 100644
--- a/dlls/ole32/memlockbytes.c
+++ b/dlls/ole32/memlockbytes.c
@@ -160,7 +160,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* iface, HGLOBAL* phglobal)
/* It is not our lockbytes implementation, so use a more generic way */
hres = ILockBytes_Stat(iface,&stbuf,STATFLAG_NONAME);
if (hres != S_OK) {
- ERR("Cannot ILockBytes_Stat, %x\n",hres);
+ ERR("Cannot ILockBytes_Stat, %lx\n",hres);
return hres;
}
TRACE("cbSize is %s\n", wine_dbgstr_longlong(stbuf.cbSize.QuadPart));
@@ -171,11 +171,11 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* iface, HGLOBAL* phglobal)
hres = ILockBytes_ReadAt(iface, start, GlobalLock(*phglobal), stbuf.cbSize.u.LowPart, &xread);
GlobalUnlock(*phglobal);
if (hres != S_OK) {
- FIXME("%p->ReadAt failed with %x\n",iface,hres);
+ FIXME("%p->ReadAt failed with %lx\n",iface,hres);
return hres;
}
if (stbuf.cbSize.u.LowPart != xread) {
- FIXME("Read size is not requested size %d vs %d?\n",stbuf.cbSize.u.LowPart, xread);
+ FIXME("Read size is not requested size %ld vs %ld?\n",stbuf.cbSize.u.LowPart, xread);
}
return S_OK;
}
diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c
index ac47f5528c8..09266a33aba 100644
--- a/dlls/ole32/moniker.c
+++ b/dlls/ole32/moniker.c
@@ -159,7 +159,7 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MonikerComparison
IROTData_Release(pROTData);
if (hr != S_OK)
{
- ERR("Failed to copy comparison data into buffer, hr = 0x%08x\n", hr);
+ ERR("Failed to copy comparison data into buffer, hr = %#lx\n", hr);
HeapFree(GetProcessHeap(), 0, *moniker_data);
return hr;
}
@@ -218,7 +218,7 @@ static HRESULT reduce_moniker(IMoniker *pmk, IBindCtx *pbc, IMoniker **pmkReduce
}
hr = IMoniker_Reduce(pmk, pbc, MKRREDUCE_ALL, NULL, pmkReduced);
if (FAILED(hr))
- ERR("reducing moniker failed with error 0x%08x\n", hr);
+ ERR("reducing moniker failed with error %#lx.\n", hr);
if (pbcNew) IBindCtx_Release(pbcNew);
return hr;
}
@@ -288,11 +288,11 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD flags,
IBindCtx *pbc;
InterfaceData *moniker = NULL;
- TRACE("%p, %#x, %p, %p, %p\n", This, flags, punkObject, pmkObjectName, pdwRegister);
+ TRACE("%p, %#lx, %p, %p, %p\n", iface, flags, punkObject, pmkObjectName, pdwRegister);
if (flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT))
{
- ERR("Invalid flags: 0x%08x\n", flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
+ ERR("Invalid flags: %#lx\n", flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
return E_INVALIDARG;
}
@@ -435,7 +435,7 @@ RunningObjectTableImpl_Revoke( IRunningObjectTable* iface, DWORD dwRegister)
RunningObjectTableImpl *This = impl_from_IRunningObjectTable(iface);
struct rot_entry *rot_entry;
- TRACE("(%p,%d)\n",This,dwRegister);
+ TRACE("%p, %ld.\n", iface, dwRegister);
EnterCriticalSection(&This->lock);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
@@ -568,7 +568,7 @@ RunningObjectTableImpl_GetObject( IRunningObjectTable* iface,
}
}
else
- WARN("Moniker unavailable, IrotGetObject returned 0x%08x\n", hr);
+ WARN("Moniker unavailable, IrotGetObject returned %#lx\n", hr);
HeapFree(GetProcessHeap(), 0, moniker_data);
@@ -590,7 +590,7 @@ RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
struct rot_entry *rot_entry;
HRESULT hr = E_INVALIDARG;
- TRACE("(%p,%d,%p)\n",This,dwRegister,pfiletime);
+ TRACE("%p, %ld, %p.\n", iface, dwRegister, pfiletime);
EnterCriticalSection(&This->lock);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
@@ -608,7 +608,7 @@ RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
LeaveCriticalSection(&This->lock);
done:
- TRACE("-- 0x08%x\n", hr);
+ TRACE("-- %#lx\n", hr);
return hr;
}
@@ -661,7 +661,7 @@ RunningObjectTableImpl_GetTimeOfLastChange(IRunningObjectTable* iface,
HeapFree(GetProcessHeap(), 0, moniker_data);
- TRACE("-- 0x%08x\n", hr);
+ TRACE("-- %#lx\n", hr);
return hr;
}
@@ -717,7 +717,7 @@ static RunningObjectTableImpl rot =
*/
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
{
- TRACE("%#x, %p\n", reserved, ret);
+ TRACE("%#lx, %p\n", reserved, ret);
if (reserved!=0)
return E_UNEXPECTED;
@@ -1048,7 +1048,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IM
EnumMonikerImpl *This = impl_from_IEnumMoniker(iface);
HRESULT hr = S_OK;
- TRACE("(%p) TabCurrentPos %d Tablastindx %d\n", This, This->pos, This->moniker_list->size);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
/* retrieve the requested number of moniker from the current position */
for(i = 0; (This->pos < This->moniker_list->size) && (i < celt); i++)
@@ -1270,7 +1270,7 @@ static HRESULT WINAPI MonikerMarshal_GetUnmarshalClass(
{
MonikerMarshal *This = impl_from_IMarshal(iface);
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid);
return IMoniker_GetClassID(This->moniker, pCid);
@@ -1284,7 +1284,7 @@ static HRESULT WINAPI MonikerMarshal_GetMarshalSizeMax(
HRESULT hr;
ULARGE_INTEGER size;
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pSize);
hr = IMoniker_GetSizeMax(This->moniker, &size);
@@ -1299,7 +1299,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream *
{
MonikerMarshal *This = impl_from_IMarshal(iface);
- TRACE("(%p, %s, %p, %x, %p, %x)\n", pStm, debugstr_guid(riid), pv,
+ TRACE("%p, %s, %p, %lx, %p, %lx.\n", pStm, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags);
return IMoniker_Save(This->moniker, pStm, FALSE);
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index a2781e51d5b..ee6a0b69b06 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -253,9 +253,10 @@ void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
/******************************************************************************
* OleInitializeWOW [OLE32.@]
*/
-HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y) {
- FIXME("(0x%08x, 0x%08x),stub!\n",x, y);
- return 0;
+HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y)
+{
+ FIXME("%#lx, %#lx stub!\n", x, y);
+ return 0;
}
/*************************************************************
@@ -664,7 +665,7 @@ HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
HRESULT hres;
LONG ret;
- TRACE("(%s, %u, %p)\n", debugstr_guid(clsid), form, usertype);
+ TRACE("%s, %lu, %p.\n", debugstr_guid(clsid), form, usertype);
if (!usertype)
return E_INVALIDARG;
@@ -735,7 +736,7 @@ HRESULT WINAPI DoDragDrop (
HWND hwndTrackWindow;
MSG msg;
- TRACE("(%p, %p, %08x, %p)\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
+ TRACE("%p, %p, %#lx, %p.\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
if (!pDataObject || !pDropSource || !pdwEffect)
return E_INVALIDARG;
@@ -844,7 +845,7 @@ HRESULT WINAPI OleRegGetMiscStatus(
LONG result;
HRESULT hr;
- TRACE("(%s, %d, %p)\n", debugstr_guid(clsid), dwAspect, pdwStatus);
+ TRACE("%s, %ld, %p.\n", debugstr_guid(clsid), dwAspect, pdwStatus);
if (!pdwStatus) return E_INVALIDARG;
@@ -934,7 +935,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
HRESULT hr = S_OK;
- TRACE("(%d, %p, %p)\n", celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
if (pceltFetched)
*pceltFetched = 0;
@@ -954,14 +955,14 @@ static HRESULT WINAPI EnumOLEVERB_Next(
}
else if (res != ERROR_SUCCESS)
{
- ERR("RegEnumKeyW failed with error %d\n", res);
+ ERR("RegEnumKeyW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
res = RegQueryValueW(This->hkeyVerb, wszSubKey, NULL, &cbData);
if (res != ERROR_SUCCESS)
{
- ERR("RegQueryValueW failed with error %d\n", res);
+ ERR("RegQueryValueW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
@@ -974,7 +975,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
res = RegQueryValueW(This->hkeyVerb, wszSubKey, pwszOLEVERB, &cbData);
if (res != ERROR_SUCCESS)
{
- ERR("RegQueryValueW failed with error %d\n", res);
+ ERR("RegQueryValueW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
CoTaskMemFree(pwszOLEVERB);
break;
@@ -1020,7 +1021,7 @@ static HRESULT WINAPI EnumOLEVERB_Skip(
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
- TRACE("(%d)\n", celt);
+ TRACE("%p, %lu.\n", iface, celt);
This->index += celt;
return S_OK;
@@ -1108,7 +1109,7 @@ HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
else if (res == REGDB_E_KEYMISSING)
ERR("no Verbs key for class %s\n", debugstr_guid(clsid));
else
- ERR("failed to open Verbs key for CLSID %s with error %d\n",
+ ERR("failed to open Verbs key for CLSID %s with error %ld\n",
debugstr_guid(clsid), res);
return res;
}
@@ -1117,7 +1118,7 @@ HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
NULL, NULL, NULL, NULL, NULL, NULL);
if (res != ERROR_SUCCESS)
{
- ERR("failed to get subkey count with error %d\n", GetLastError());
+ ERR("failed to get subkey count with error %ld\n", GetLastError());
return REGDB_E_READREGDB;
}
@@ -1602,7 +1603,7 @@ static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lPar
OleMenuHookItem *pHookItem = NULL;
WORD fuFlags;
- TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
+ TRACE("%i, %#Ix, %#Ix.\n", code, wParam, lParam );
/* Check if we're being asked to process the message */
if ( HC_ACTION != code )
@@ -1707,7 +1708,7 @@ static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lPara
OleMenuHookItem *pHookItem = NULL;
WORD wCode;
- TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
+ TRACE("%i, %#Ix, %#Ix.\n", code, wParam, lParam );
/* Check if we're being asked to process a messages */
if ( HC_ACTION != code )
@@ -1943,7 +1944,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
}
TRACE_(accel)("hAccel=%p, cAccelEntries=%d,"
- "msg->hwnd=%p, msg->message=%04x, wParam=%08lx, lParam=%08lx\n",
+ "msg->hwnd=%p, msg->message=%04x, wParam=%#Ix, lParam=%#Ix\n",
hAccel, cAccelEntries,
lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam);
for(i = 0; i < cAccelEntries; i++)
@@ -1964,7 +1965,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
if(lpAccelTbl[i].fVirt & FVIRTKEY)
{
INT mask = 0;
- TRACE_(accel)("found accel for virt_key %04lx (scan %04x)\n",
+ TRACE_(accel)("found accel for virt_key %Ix (scan %04x)\n",
lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff);
if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
@@ -2463,7 +2464,7 @@ HRESULT WINAPI OleCreate(
IUnknown * pUnk = NULL;
IOleObject *pOleObject = NULL;
- TRACE("(%s, %s, %d, %p, %p, %p, %p)\n", debugstr_guid(rclsid),
+ TRACE("%s, %s, %ld, %p, %p, %p, %p.\n", debugstr_guid(rclsid),
debugstr_guid(riid), renderopt, pFormatEtc, pClientSite, pStg, ppvObj);
hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, riid, (LPVOID*)&pUnk);
@@ -2488,7 +2489,7 @@ HRESULT WINAPI OleCreate(
{
TRACE("trying to set stg %p\n", pStg);
hres = IPersistStorage_InitNew(pPS, pStg);
- TRACE("-- result 0x%08x\n", hres);
+ TRACE("-- result %#lx\n", hres);
IPersistStorage_Release(pPS);
}
}
@@ -2497,7 +2498,7 @@ HRESULT WINAPI OleCreate(
{
TRACE("trying to set clientsite %p\n", pClientSite);
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
- TRACE("-- result 0x%08x\n", hres);
+ TRACE("-- result %#lx\n", hres);
}
if (pOleObject)
@@ -2851,7 +2852,7 @@ HRESULT WINAPI OleCreateFromDataEx(IDataObject *data, REFIID iid, DWORD flags,
HRESULT hr;
UINT src_cf;
- FIXME("(%p, %s, %08x, %08x, %d, %p, %p, %p, %p, %p, %p, %p): stub\n",
+ FIXME("%p, %s, %#lx, %#lx, %ld, %p, %p, %p, %p, %p, %p, %p: stub\n",
data, debugstr_guid(iid), flags, renderopt, num_cache_fmts, adv_flags, cache_fmts,
sink, conns, client_site, stg, obj);
@@ -2884,7 +2885,7 @@ HRESULT WINAPI OleCreateFromData(IDataObject *data, REFIID iid, DWORD renderopt,
HRESULT WINAPI OleCreateLinkFromData(IDataObject *data, REFIID iid, DWORD renderopt, FORMATETC *fmt,
IOleClientSite *client_site, IStorage *stg, void **obj)
{
- FIXME("%p,%s,%08x,%p,%p,%p,%p: semi-stub\n",
+ FIXME("%p, %s, %#lx, %p, %p, %p, %p: semi-stub\n",
data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
return OleCreateFromData(data, iid, renderopt, fmt, client_site, stg, obj);
}
@@ -2904,8 +2905,7 @@ HRESULT WINAPI OleCreateStaticFromData(IDataObject *data, REFIID iid, DWORD rend
STGMEDIUM stgmedium;
LPOLESTR ole_typename;
- TRACE("(%p, %s, 0x%08x, %p, %p, %p, %p)\n",
- data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
+ TRACE("%p, %s, %#lx, %p, %p, %p, %p.\n", data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
if (!obj || !stg)
return E_INVALIDARG;
@@ -3007,11 +3007,11 @@ HRESULT WINAPI OleCreateFromFileEx(REFCLSID clsid, const OLECHAR *filename, REFI
IOleCache *cache = NULL;
ULONG i;
- TRACE("cls %s, %s, iid %s, flags %d, render opts %d, num fmts %d, adv flags %p, fmts %p\n", debugstr_guid(clsid),
+ TRACE("cls %s, %s, iid %s, flags %ld, render opts %ld, num fmts %ld, adv flags %p, fmts %p\n", debugstr_guid(clsid),
debugstr_w(filename), debugstr_guid(iid), flags, renderopt, num_fmts, adv_flags, fmts);
TRACE("sink %p, conns %p, client site %p, storage %p, obj %p\n", sink, conns, client_site, stg, obj);
for (i = 0; i < num_fmts; i++)
- TRACE("\t%d: fmt %s adv flags %d\n", i, debugstr_formatetc(fmts + i), adv_flags[i]);
+ TRACE("\t%ld: fmt %s adv flags %ld\n", i, debugstr_formatetc(fmts + i), adv_flags[i]);
hr = CreateFileMoniker( filename, &mon );
if (FAILED(hr)) return hr;
diff --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c
index 7fad171facd..0d8198480b1 100644
--- a/dlls/ole32/ole2stubs.c
+++ b/dlls/ole32/ole2stubs.c
@@ -37,7 +37,7 @@ HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid,
DWORD renderopt, LPFORMATETC lpFormatEtc,
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
{
- FIXME("(%p,%p,%i,%p,%p,%p,%p), stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
+ FIXME("%p, %p, %ld, %p, %p, %p, %p stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
return E_NOTIMPL;
}
@@ -77,7 +77,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH OleRegEnumFormatEtc (
DWORD dwDirection,
LPENUMFORMATETC* ppenumFormatetc)
{
- FIXME("(%p, %d, %p), stub!\n", clsid, dwDirection, ppenumFormatetc);
+ FIXME("%p, %ld, %p stub!\n", clsid, dwDirection, ppenumFormatetc);
return E_NOTIMPL;
}
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index 13a873655f5..464c4776b40 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -128,7 +128,7 @@ static HRESULT WINAPI EnumSTATDATA_Next(IEnumSTATDATA *iface, ULONG num, LPSTATD
DWORD count = 0;
HRESULT hr = S_OK;
- TRACE("(%d, %p, %p)\n", num, data, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, num, data, fetched);
while(num--)
{
@@ -153,7 +153,7 @@ static HRESULT WINAPI EnumSTATDATA_Skip(IEnumSTATDATA *iface, ULONG num)
{
EnumSTATDATA *This = impl_from_IEnumSTATDATA(iface);
- TRACE("(%d)\n", num);
+ TRACE("%p, %lu.\n", iface, num);
if(This->index + num >= This->num_of_elems)
{
@@ -309,7 +309,7 @@ static ULONG WINAPI OleAdviseHolderImpl_AddRef(IOleAdviseHolder *iface)
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(ref=%d)\n", This, ref - 1);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -320,9 +320,9 @@ static ULONG WINAPI OleAdviseHolderImpl_AddRef(IOleAdviseHolder *iface)
static ULONG WINAPI OleAdviseHolderImpl_Release(IOleAdviseHolder *iface)
{
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
- ULONG ref;
- TRACE("(%p)->(ref=%d)\n", This, This->ref);
- ref = InterlockedDecrement(&This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0) OleAdviseHolderImpl_Destructor(This);
@@ -382,7 +382,7 @@ static HRESULT WINAPI OleAdviseHolderImpl_Unadvise(IOleAdviseHolder *iface,
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
DWORD index;
- TRACE("(%p)->(%u)\n", This, dwConnection);
+ TRACE("%p, %lu.\n", iface, dwConnection);
/* The connection number is 1 more than the index, see OleAdviseHolder_Advise */
index = dwConnection - 1;
@@ -609,8 +609,9 @@ static HRESULT WINAPI DataAdviseHolder_QueryInterface(IDataAdviseHolder *iface,
static ULONG WINAPI DataAdviseHolder_AddRef(IDataAdviseHolder *iface)
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- TRACE("(%p) (ref=%d)\n", This, This->ref);
- return InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
+ return ref;
}
/************************************************************************
@@ -619,10 +620,10 @@ static ULONG WINAPI DataAdviseHolder_AddRef(IDataAdviseHolder *iface)
static ULONG WINAPI DataAdviseHolder_Release(IDataAdviseHolder *iface)
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- ULONG ref;
- TRACE("(%p) (ref=%d)\n", This, This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
- ref = InterlockedDecrement(&This->ref);
if (ref==0) DataAdviseHolder_Destructor(This);
return ref;
@@ -641,8 +642,7 @@ static HRESULT WINAPI DataAdviseHolder_Advise(IDataAdviseHolder *iface,
STATDATA new_conn;
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- TRACE("(%p)->(%p, %p, %08x, %p, %p)\n", This, pDataObject, pFetc, advf,
- pAdvise, pdwConnection);
+ TRACE("%p, %p, %p, %#lx, %p, %p.\n", iface, pDataObject, pFetc, advf, pAdvise, pdwConnection);
if (pdwConnection==NULL)
return E_POINTER;
@@ -709,7 +709,8 @@ static HRESULT WINAPI DataAdviseHolder_Unadvise(IDataAdviseHolder *iface,
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
DWORD index;
- TRACE("(%p)->(%u)\n", This, dwConnection);
+
+ TRACE("%p, %lu.\n", iface, dwConnection);
/* The connection number is 1 more than the index, see DataAdviseHolder_Advise */
index = dwConnection - 1;
@@ -756,7 +757,7 @@ static HRESULT WINAPI DataAdviseHolder_SendOnDataChange(IDataAdviseHolder *iface
IEnumSTATDATA *pEnum;
HRESULT hr;
- TRACE("(%p)->(%p, %08x, %08x)\n", iface, data_obj, dwReserved, advf);
+ TRACE("%p, %p, %#lx, %#lx.\n", iface, data_obj, dwReserved, advf);
hr = IDataAdviseHolder_EnumAdvise(iface, &pEnum);
if (SUCCEEDED(hr))
diff --git a/dlls/ole32/pointermoniker.c b/dlls/ole32/pointermoniker.c
index c95c835e9e3..0beab94c649 100644
--- a/dlls/ole32/pointermoniker.c
+++ b/dlls/ole32/pointermoniker.c
@@ -95,7 +95,7 @@ static ULONG WINAPI PointerMonikerImpl_AddRef(IMoniker *iface)
PointerMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -105,7 +105,7 @@ static ULONG WINAPI PointerMonikerImpl_Release(IMoniker *iface)
PointerMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -230,7 +230,7 @@ static HRESULT WINAPI
PointerMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -509,7 +509,7 @@ static HRESULT WINAPI pointer_moniker_marshal_GetUnmarshalClass(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %x, %p, %x, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %lx, %p, %lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, clsid);
return IMoniker_GetClassID(&moniker->IMoniker_iface, clsid);
@@ -520,7 +520,7 @@ static HRESULT WINAPI pointer_moniker_marshal_GetMarshalSizeMax(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %d, %p, %#x, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %ld, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, size);
return CoGetMarshalSizeMax(size, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
@@ -531,7 +531,7 @@ static HRESULT WINAPI pointer_moniker_marshal_MarshalInterface(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %x, %p, %x.\n", stream, debugstr_guid(riid), pv,
+ TRACE("%p, %s, %p, %lx, %p, %lx.\n", stream, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags);
return CoMarshalInterface(stream, &IID_IUnknown, moniker->pObject, dwDestContext,
@@ -550,7 +550,7 @@ static HRESULT WINAPI pointer_moniker_marshal_UnmarshalInterface(IMarshal *iface
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void **)&object);
if (FAILED(hr))
{
- ERR("Couldn't unmarshal moniker, hr = %#x.\n", hr);
+ ERR("Couldn't unmarshal moniker, hr = %#lx.\n", hr);
return hr;
}
@@ -570,7 +570,7 @@ static HRESULT WINAPI pointer_moniker_marshal_ReleaseMarshalData(IMarshal *iface
static HRESULT WINAPI pointer_moniker_marshal_DisconnectObject(IMarshal *iface, DWORD reserved)
{
- TRACE("%p, %#x.\n", iface, reserved);
+ TRACE("%p, %#lx.\n", iface, reserved);
return S_OK;
}
@@ -699,7 +699,7 @@ static ULONG WINAPI ObjrefMonikerImpl_AddRef(IMoniker *iface)
ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
return refcount;
}
@@ -709,7 +709,7 @@ static ULONG WINAPI ObjrefMonikerImpl_Release(IMoniker *iface)
ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
if (!refcount)
{
@@ -772,7 +772,7 @@ static HRESULT WINAPI ObjrefMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx
static HRESULT WINAPI ObjrefMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD howfar,
IMoniker **left, IMoniker **reduced)
{
- FIXME("(%p,%p,%d,%p,%p): stub\n", iface, pbc, howfar, left, reduced);
+ FIXME("%p, %p, %ld, %p, %p: stub\n", iface, pbc, howfar, left, reduced);
return E_NOTIMPL;
}
@@ -930,7 +930,7 @@ static HRESULT WINAPI objref_moniker_marshal_GetUnmarshalClass(IMarshal *iface,
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%x,%p)\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %#lx, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, clsid);
return IMoniker_GetClassID(&moniker->IMoniker_iface, clsid);
@@ -941,7 +941,7 @@ static HRESULT WINAPI objref_moniker_marshal_GetMarshalSizeMax(IMarshal *iface,
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%08x,%p)\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %#lx, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, size);
return CoGetMarshalSizeMax(size, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
@@ -952,7 +952,7 @@ static HRESULT WINAPI objref_moniker_marshal_MarshalInterface(IMarshal *iface, I
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%08x)\n", stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags);
+ TRACE("%p, %s, %p, %#lx, %p, %#lx\n", stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags);
return CoMarshalInterface(stream, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
}
@@ -969,7 +969,7 @@ static HRESULT WINAPI objref_moniker_marshal_UnmarshalInterface(IMarshal *iface,
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void **)&object);
if (FAILED(hr))
{
- ERR("Couldn't unmarshal moniker, hr = %#x.\n", hr);
+ ERR("Couldn't unmarshal moniker, hr = %#lx.\n", hr);
return hr;
}
@@ -988,7 +988,7 @@ static HRESULT WINAPI objref_moniker_marshal_ReleaseMarshalData(IMarshal *iface,
static HRESULT WINAPI objref_moniker_marshal_DisconnectObject(IMarshal *iface, DWORD reserved)
{
- TRACE("(%p,%08x)\n", iface, reserved);
+ TRACE("%p, %#lx.\n", iface, reserved);
return S_OK;
}
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index cd30dad8c99..28793d7cbd5 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -211,7 +211,7 @@ static ULONG WINAPI enum_stat_prop_stg_AddRef(IEnumSTATPROPSTG *iface)
struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface);
LONG refcount = InterlockedIncrement(&penum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -221,7 +221,7 @@ static ULONG WINAPI enum_stat_prop_stg_Release(IEnumSTATPROPSTG *iface)
struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface);
LONG refcount = InterlockedDecrement(&penum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -239,7 +239,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel
ULONG count = 0;
WCHAR *name;
- TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, ret, fetched);
if (penum->current == ~0u)
penum->current = 0;
@@ -267,7 +267,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel
static HRESULT WINAPI enum_stat_prop_stg_Skip(IEnumSTATPROPSTG *iface, ULONG celt)
{
- FIXME("%p, %u.\n", iface, celt);
+ FIXME("%p, %lu.\n", iface, celt);
return S_OK;
}
@@ -486,7 +486,7 @@ static HRESULT WINAPI IPropertyStorage_fnReadMultiple(
HRESULT hr = S_OK;
ULONG i;
- TRACE("(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
+ TRACE("%p, %lu, %p, %p\n", iface, cpspec, rgpspec, rgpropvar);
if (!cpspec)
return S_FALSE;
@@ -613,7 +613,7 @@ static HRESULT PropertyStorage_StringCopy(LPCSTR src, UINT srcCP, LPSTR *dst, UI
HeapFree(GetProcessHeap(), 0, wideStr_tmp);
}
}
- TRACE("returning 0x%08x (%s)\n", hr,
+ TRACE("returning %#lx (%s)\n", hr,
dstCP == CP_UNICODE ? debugstr_w((LPCWSTR)*dst) : debugstr_a(*dst));
return hr;
}
@@ -671,7 +671,7 @@ static HRESULT PropertyStorage_StorePropWithId(PropertyStorage_impl *This,
case VT_VECTOR|VT_I1:
This->format = 1;
}
- TRACE("Setting 0x%08x to type %d\n", propid, propvar->vt);
+ TRACE("Setting %#lx to type %d\n", propid, propvar->vt);
if (prop)
{
PropVariantClear(prop);
@@ -727,7 +727,7 @@ static HRESULT PropertyStorage_StoreNameWithId(PropertyStorage_impl *This,
if (strlen(name) >= MAX_VERSION_0_PROP_NAME_LENGTH)
This->format = 1;
}
- TRACE("Adding prop name %s, propid %d\n",
+ TRACE("Adding prop name %s, propid %ld\n",
This->codePage == CP_UNICODE ? debugstr_w((LPCWSTR)name) :
debugstr_a(name), id);
dictionary_insert(This->name_to_propid, name, UlongToPtr(id));
@@ -750,7 +750,7 @@ static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(
HRESULT hr = S_OK;
ULONG i;
- TRACE("(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
+ TRACE("%p, %lu, %p, %p.\n", iface, cpspec, rgpspec, rgpropvar);
if (cpspec && (!rgpspec || !rgpropvar))
return E_INVALIDARG;
@@ -849,7 +849,7 @@ static HRESULT WINAPI IPropertyStorage_fnDeleteMultiple(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, cpspec, rgpspec);
+ TRACE("%p, %ld, %p.\n", iface, cpspec, rgpspec);
if (cpspec && !rgpspec)
return E_INVALIDARG;
@@ -895,7 +895,7 @@ static HRESULT WINAPI IPropertyStorage_fnReadPropertyNames(
ULONG i;
HRESULT hr = S_FALSE;
- TRACE("(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
+ TRACE("%p, %ld, %p, %p.\n", iface, cpropid, rgpropid, rglpwstrName);
if (cpropid && (!rgpropid || !rglpwstrName))
return E_INVALIDARG;
@@ -935,7 +935,7 @@ static HRESULT WINAPI IPropertyStorage_fnWritePropertyNames(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
+ TRACE("%p, %lu, %p, %p.\n", iface, cpropid, rgpropid, rglpwstrName);
if (cpropid && (!rgpropid || !rglpwstrName))
return E_INVALIDARG;
@@ -968,7 +968,7 @@ static HRESULT WINAPI IPropertyStorage_fnDeletePropertyNames(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, cpropid, rgpropid);
+ TRACE("%p, %ld, %p.\n", iface, cpropid, rgpropid);
if (cpropid && !rgpropid)
return E_INVALIDARG;
@@ -1003,7 +1003,7 @@ static HRESULT WINAPI IPropertyStorage_fnCommit(
PropertyStorage_impl *This = impl_from_IPropertyStorage(iface);
HRESULT hr;
- TRACE("(%p, 0x%08x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
if (!(This->grfMode & STGM_READWRITE))
return STG_E_ACCESSDENIED;
@@ -1149,7 +1149,7 @@ static void PropertyStorage_PropNameDestroy(void *k, void *d, void *extra)
static int PropertyStorage_PropCompare(const void *a, const void *b,
void *extra)
{
- TRACE("(%u, %u)\n", PtrToUlong(a), PtrToUlong(b));
+ TRACE("%lu, %lu.\n", PtrToUlong(a), PtrToUlong(b));
return PtrToUlong(a) - PtrToUlong(b);
}
@@ -1279,12 +1279,12 @@ static HRESULT propertystorage_read_scalar(PROPVARIANT *prop, const struct read_
case VT_INT:
case VT_I4:
hr = buffer_read_dword(buffer, offset, (DWORD *)&prop->lVal);
- TRACE("Read long %d\n", prop->lVal);
+ TRACE("Read long %ld\n", prop->lVal);
break;
case VT_UINT:
case VT_UI4:
hr = buffer_read_dword(buffer, offset, &prop->ulVal);
- TRACE("Read ulong %d\n", prop->ulVal);
+ TRACE("Read ulong %ld\n", prop->ulVal);
break;
case VT_I8:
hr = buffer_read_uint64(buffer, offset, (ULARGE_INTEGER *)&prop->hVal);
@@ -1398,7 +1398,7 @@ static HRESULT propertystorage_read_scalar(PROPVARIANT *prop, const struct read_
if (prop->blob.pBlobData)
{
hr = buffer_read_len(buffer, offset, prop->blob.pBlobData, count);
- TRACE("Read blob value of size %d\n", count);
+ TRACE("Read blob value of size %ld\n", count);
}
else
hr = STG_E_INSUFFICIENTMEMORY;
@@ -1583,7 +1583,7 @@ static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1600,7 +1600,7 @@ static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm,
&hdr->reserved);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1618,7 +1618,7 @@ static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1629,7 +1629,7 @@ static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm,
&fmt->dwOffset);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1647,7 +1647,7 @@ static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1658,7 +1658,7 @@ static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm,
cProperties), &hdr->cProperties);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1677,7 +1677,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (FAILED(hr = buffer_read_dword(buffer, offset, &numEntries)))
return hr;
- TRACE("Reading %d entries:\n", numEntries);
+ TRACE("Reading %ld entries:\n", numEntries);
offset += sizeof(DWORD);
@@ -1697,7 +1697,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (FAILED(hr = buffer_test_offset(buffer, offset, This->codePage == CP_UNICODE ?
ALIGNED_LENGTH(cbEntry * sizeof(WCHAR), 3) : cbEntry)))
{
- WARN("Broken name length for entry %d.\n", i);
+ WARN("Broken name length for entry %ld.\n", i);
return hr;
}
@@ -1709,11 +1709,11 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (ch)
{
- WARN("Dictionary entry name %d is not null-terminated.\n", i);
+ WARN("Dictionary entry name %ld is not null-terminated.\n", i);
return E_FAIL;
}
- TRACE("Reading entry with ID %#x, %d chars, name %s.\n", propid, cbEntry, This->codePage == CP_UNICODE ?
+ TRACE("Reading entry with ID %#lx, %ld chars, name %s.\n", propid, cbEntry, This->codePage == CP_UNICODE ?
debugstr_wn((WCHAR *)buffer->data, cbEntry) : debugstr_an((char *)buffer->data, cbEntry));
hr = PropertyStorage_StoreNameWithId(This, (char *)buffer->data + offset, This->codePage, propid);
@@ -1796,8 +1796,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
goto end;
if (fmtOffset.dwOffset > stat.cbSize.u.LowPart)
{
- WARN("invalid offset %d (stream length is %d)\n", fmtOffset.dwOffset,
- stat.cbSize.u.LowPart);
+ WARN("invalid offset %ld (stream length is %ld)\n", fmtOffset.dwOffset, stat.cbSize.u.LowPart);
hr = STG_E_INVALIDHEADER;
goto end;
}
@@ -1814,7 +1813,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
/* The section size includes the section header, so check it */
if (sectionHdr.cbSection < sizeof(PROPERTYSECTIONHEADER))
{
- WARN("section header too small, got %d\n", sectionHdr.cbSection);
+ WARN("section header too small, got %ld\n", sectionHdr.cbSection);
hr = STG_E_INVALIDHEADER;
goto end;
}
@@ -1831,7 +1830,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
hr = IStream_Read(This->stm, read_buffer.data, read_buffer.size, &count);
if (FAILED(hr))
goto end;
- TRACE("Reading %d properties:\n", sectionHdr.cProperties);
+ TRACE("Reading %ld properties:\n", sectionHdr.cProperties);
for (i = 0; SUCCEEDED(hr) && i < sectionHdr.cProperties; i++)
{
PROPERTYIDOFFSET *idOffset = (PROPERTYIDOFFSET *)(read_buffer.data +
@@ -1853,7 +1852,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
* later.
*/
dictOffset = idOffset->dwOffset;
- TRACE("Dictionary offset is %d\n", dictOffset);
+ TRACE("Dictionary offset is %ld\n", dictOffset);
}
else
{
@@ -1864,8 +1863,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
idOffset->dwOffset - sizeof(PROPERTYSECTIONHEADER), This->codePage,
Allocate_CoTaskMemAlloc, NULL)))
{
- TRACE("Read property with ID 0x%08x, type %d\n",
- idOffset->propid, prop.vt);
+ TRACE("Read property with ID %#lx, type %d\n", idOffset->propid, prop.vt);
switch(idOffset->propid)
{
case PID_CODEPAGE:
@@ -1901,7 +1899,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
}
if (!This->locale)
This->locale = LOCALE_SYSTEM_DEFAULT;
- TRACE("Code page is %d, locale is %d\n", This->codePage, This->locale);
+ TRACE("Code page is %d, locale is %ld\n", This->codePage, This->locale);
if (dictOffset)
hr = PropertyStorage_ReadDictionary(This, &read_buffer, dictOffset - sizeof(PROPERTYSECTIONHEADER));
@@ -2088,7 +2086,7 @@ static HRESULT PropertyStorage_WriteDictionaryToStream(
if (closure.bytesWritten % sizeof(DWORD))
{
DWORD padding = sizeof(DWORD) - closure.bytesWritten % sizeof(DWORD);
- TRACE("adding %d bytes of padding\n", padding);
+ TRACE("adding %ld bytes of padding\n", padding);
*sectionOffset += padding;
}
@@ -2109,7 +2107,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
assert(var);
assert(sectionOffset);
- TRACE("%p, %d, 0x%08x, (%d), (%d)\n", This, propNum, propid, var->vt,
+ TRACE("%p, %ld, %#lx, %d, %ld.\n", This, propNum, propid, var->vt,
*sectionOffset);
seek.QuadPart = SECTIONHEADER_OFFSET + sizeof(PROPERTYSECTIONHEADER) +
@@ -2288,7 +2286,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
if (bytesWritten % sizeof(DWORD))
{
DWORD padding = sizeof(DWORD) - bytesWritten % sizeof(DWORD);
- TRACE("adding %d bytes of padding\n", padding);
+ TRACE("adding %ld bytes of padding\n", padding);
*sectionOffset += padding;
}
}
@@ -2578,7 +2576,7 @@ static HRESULT PropertyStorage_ConstructEmpty(IStream *stm,
else
ps->codePage = CP_UNICODE;
ps->locale = LOCALE_SYSTEM_DEFAULT;
- TRACE("Code page is %d, locale is %d\n", ps->codePage, ps->locale);
+ TRACE("Code page is %d, locale is %ld\n", ps->codePage, ps->locale);
*pps = &ps->IPropertyStorage_iface;
TRACE("PropertyStorage %p constructed\n", ps);
hr = S_OK;
@@ -2626,7 +2624,7 @@ static ULONG WINAPI enum_stat_propset_stg_AddRef(IEnumSTATPROPSETSTG *iface)
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
LONG refcount = InterlockedIncrement(&psenum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -2636,7 +2634,7 @@ static ULONG WINAPI enum_stat_propset_stg_Release(IEnumSTATPROPSETSTG *iface)
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
LONG refcount = InterlockedDecrement(&psenum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -2653,7 +2651,7 @@ static HRESULT WINAPI enum_stat_propset_stg_Next(IEnumSTATPROPSETSTG *iface, ULO
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
ULONG count = 0;
- TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, ret, fetched);
if (psenum->current == ~0u)
psenum->current = 0;
@@ -2669,7 +2667,7 @@ static HRESULT WINAPI enum_stat_propset_stg_Next(IEnumSTATPROPSETSTG *iface, ULO
static HRESULT WINAPI enum_stat_propset_stg_Skip(IEnumSTATPROPSETSTG *iface, ULONG celt)
{
- FIXME("%p, %u.\n", iface, celt);
+ FIXME("%p, %lu.\n", iface, celt);
return S_OK;
}
@@ -2840,7 +2838,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
IStream *stm = NULL;
HRESULT r;
- TRACE("%p %s %08x %08x %p\n", This, debugstr_guid(rfmtid), grfFlags,
+ TRACE("%p, %s %#lx, %#lx, %p.\n", This, debugstr_guid(rfmtid), grfFlags,
grfMode, ppprstg);
/* be picky */
@@ -2879,7 +2877,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
IStream_Release( stm );
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -2897,7 +2895,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
WCHAR name[CCH_MAX_PROPSTG_NAME + 1];
HRESULT r;
- TRACE("%p %s %08x %p\n", This, debugstr_guid(rfmtid), grfMode, ppprstg);
+ TRACE("%p, %s, %#lx, %p.\n", This, debugstr_guid(rfmtid), grfMode, ppprstg);
/* be picky */
if (grfMode != (STGM_READWRITE|STGM_SHARE_EXCLUSIVE) &&
@@ -2926,7 +2924,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
IStream_Release( stm );
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -3205,7 +3203,7 @@ SERIALIZEDPROPERTYVALUE* WINAPI StgConvertVariantToProperty(const PROPVARIANT *p
USHORT CodePage, SERIALIZEDPROPERTYVALUE *pprop, ULONG *pcb, PROPID pid,
BOOLEAN fReserved, ULONG *pcIndirect)
{
- FIXME("%p,%d,%p,%p,%d,%d,%p\n", pvar, CodePage, pprop, pcb, pid, fReserved, pcIndirect);
+ FIXME("%p, %d, %p, %p, %ld, %d, %p.\n", pvar, CodePage, pprop, pcb, pid, fReserved, pcIndirect);
return NULL;
}
@@ -3217,7 +3215,7 @@ HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
IStream *stm;
HRESULT r;
- TRACE("%p %s %s %08x %d %p\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
+ TRACE("%p, %s, %s, %#lx, %ld, %p.\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
if (!fmt || reserved)
{
@@ -3251,7 +3249,7 @@ HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
}
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -3262,7 +3260,7 @@ HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags,
IStream *stm;
HRESULT r;
- TRACE("%p %s %08x %d %p\n", unk, debugstr_guid(fmt), flags, reserved, prop_stg);
+ TRACE("%p, %s, %#lx, %ld, %p.\n", unk, debugstr_guid(fmt), flags, reserved, prop_stg);
if (!fmt || reserved)
{
@@ -3296,6 +3294,6 @@ HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags,
}
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c
index 1a5f061250e..73fc1cc9480 100644
--- a/dlls/ole32/stg_stream.c
+++ b/dlls/ole32/stg_stream.c
@@ -136,8 +136,7 @@ static HRESULT WINAPI StgStreamImpl_Read(
ULONG bytesReadBuffer;
HRESULT res;
- TRACE("(%p, %p, %d, %p)\n",
- iface, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", iface, pv, cb, pcbRead);
if (!This->parentStorage)
{
@@ -167,7 +166,7 @@ static HRESULT WINAPI StgStreamImpl_Read(
This->currentPosition.QuadPart += *pcbRead;
}
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -192,8 +191,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
ULONG bytesWritten = 0;
HRESULT res;
- TRACE("(%p, %p, %d, %p)\n",
- iface, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", iface, pv, cb, pcbWritten);
/*
* Do we have permission to write to this stream?
@@ -204,7 +202,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
case STGM_READWRITE:
break;
default:
- WARN("access denied by flags: 0x%x\n", STGM_ACCESS_MODE(This->grfMode));
+ WARN("access denied by flags: %#lx\n", STGM_ACCESS_MODE(This->grfMode));
return STG_E_ACCESSDENIED;
}
@@ -250,7 +248,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
if (SUCCEEDED(res))
res = StorageBaseImpl_Flush(This->parentStorage);
- TRACE("<-- %08x, written %u\n", res, *pcbWritten);
+ TRACE("<-- %#lx, written %lu\n", res, *pcbWritten);
return res;
}
@@ -274,8 +272,7 @@ static HRESULT WINAPI StgStreamImpl_Seek(
DirEntry currentEntry;
HRESULT hr;
- TRACE("(%p, %d, %d, %p)\n",
- iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
+ TRACE("%p, %ld, %ld, %p.\n", iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
/*
* fail if the stream has no parent (as does windows)
@@ -316,7 +313,7 @@ static HRESULT WINAPI StgStreamImpl_Seek(
*plibNewPosition = currentEntry.size;
break;
default:
- WARN("invalid dwOrigin %d\n", dwOrigin);
+ WARN("invalid dwOrigin %ld\n", dwOrigin);
return STG_E_INVALIDFUNCTION;
}
@@ -345,7 +342,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
HRESULT hr;
- TRACE("(%p, %d)\n", iface, libNewSize.u.LowPart);
+ TRACE("%p, %ld.\n", iface, libNewSize.u.LowPart);
if(!This->parentStorage)
{
@@ -358,7 +355,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
*/
if (libNewSize.u.HighPart != 0)
{
- WARN("invalid value for libNewSize.u.HighPart %d\n", libNewSize.u.HighPart);
+ WARN("invalid value for libNewSize.u.HighPart %ld\n", libNewSize.u.HighPart);
return STG_E_INVALIDFUNCTION;
}
@@ -400,8 +397,7 @@ static HRESULT WINAPI StgStreamImpl_CopyTo(
ULARGE_INTEGER totalBytesRead;
ULARGE_INTEGER totalBytesWritten;
- TRACE("(%p, %p, %d, %p, %p)\n",
- iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
/*
* Sanity check
@@ -547,7 +543,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
DirEntry currentEntry;
HRESULT hr;
- TRACE("%p %p %d\n", This, pstatstg, grfStatFlag);
+ TRACE("%p, %p, %#lx.\n", This, pstatstg, grfStatFlag);
/*
* if stream has no parent, return STG_E_REVERTED
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 1c1baa5ce08..fa7158bad1b 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -292,7 +292,7 @@ static HRESULT validateSTGM(DWORD stgm)
if (stgm&~STGM_KNOWN_FLAGS)
{
- ERR("unknown flags %08x\n", stgm);
+ ERR("unknown flags %#lx\n", stgm);
return E_FAIL;
}
@@ -463,7 +463,7 @@ static ULONG WINAPI directwriterlock_Release(IDirectWriterLock *iface)
static HRESULT WINAPI directwriterlock_WaitForWriteAccess(IDirectWriterLock *iface, DWORD timeout)
{
StorageBaseImpl *This = impl_from_IDirectWriterLock(iface);
- FIXME("(%p)->(%d): stub\n", This, timeout);
+ FIXME("%p, %ld: stub\n", This, timeout);
return E_NOTIMPL;
}
@@ -995,7 +995,7 @@ static HRESULT IEnumSTATSTGImpl_GetNextRef(
memcpy(This->name, result_name, sizeof(result_name));
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1013,7 +1013,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
DirRef currentSearchNode;
HRESULT hr=S_OK;
- TRACE("%p,%u,%p,%p\n", iface, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
if ( (rgelt==0) || ( (celt!=1) && (pceltFetched==0) ) )
return E_INVALIDARG;
@@ -1073,7 +1073,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
if (SUCCEEDED(hr) && *pceltFetched != celt)
hr = S_FALSE;
- TRACE("<-- %08x (asked %u, got %u)\n", hr, celt, *pceltFetched);
+ TRACE("<-- %#lx (asked %lu, got %lu)\n", hr, celt, *pceltFetched);
return hr;
}
@@ -1088,7 +1088,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
DirRef currentSearchNode;
HRESULT hr=S_OK;
- TRACE("%p,%u\n", iface, celt);
+ TRACE("%p, %lu.\n", iface, celt);
if (This->parentStorage->reverted)
{
@@ -1109,7 +1109,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
if (SUCCEEDED(hr) && objectFetched != celt)
return S_FALSE;
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1282,7 +1282,7 @@ static ULONG WINAPI StorageBaseImpl_AddRef(
StorageBaseImpl *This = impl_from_IStorage(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) AddRef to %d\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -1302,7 +1302,7 @@ static ULONG WINAPI StorageBaseImpl_Release(
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ReleaseRef to %d\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0)
{
@@ -1447,7 +1447,7 @@ static HRESULT StorageBaseImpl_CopyChildEntryTo(StorageBaseImpl *This,
hr = StorageBaseImpl_CopyChildEntryTo( This, data.rightChild, skip_storage,
skip_stream, snbExclude, pstgDest );
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1455,7 +1455,7 @@ static BOOL StorageBaseImpl_IsStreamOpen(StorageBaseImpl * stg, DirRef streamEnt
{
StgStreamImpl *strm;
- TRACE("%p,%d\n", stg, streamEntry);
+ TRACE("%p, %ld.\n", stg, streamEntry);
LIST_FOR_EACH_ENTRY(strm, &stg->strmHead, StgStreamImpl, StrmListEntry)
{
@@ -1472,7 +1472,7 @@ static BOOL StorageBaseImpl_IsStorageOpen(StorageBaseImpl * stg, DirRef storageE
{
StorageInternalImpl *childstg;
- TRACE("%p,%d\n", stg, storageEntry);
+ TRACE("%p, %ld.\n", stg, storageEntry);
LIST_FOR_EACH_ENTRY(childstg, &stg->storageHead, StorageInternalImpl, ParentListEntry)
{
@@ -1506,8 +1506,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
DirRef streamEntryRef;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %s, %p, %x, %d, %p)\n",
- iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
+ TRACE("%p, %s, %p, %#lx, %ld, %p.\n", iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
if ( (pwcsName==NULL) || (ppstm==0) )
{
@@ -1595,7 +1594,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
end:
if (res == S_OK)
TRACE("<-- IStream %p\n", *ppstm);
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1622,9 +1621,8 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
DirRef storageEntryRef;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %s, %p, %x, %p, %d, %p)\n",
- iface, debugstr_w(pwcsName), pstgPriority,
- grfMode, snbExclude, reserved, ppstg);
+ TRACE("%p, %s, %p, %#lx, %p, %ld, %p.\n", iface, debugstr_w(pwcsName), pstgPriority,
+ grfMode, snbExclude, reserved, ppstg);
if ((pwcsName==NULL) || (ppstg==0) )
{
@@ -1732,7 +1730,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
res = STG_E_FILENOTFOUND;
end:
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1754,8 +1752,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
StorageBaseImpl *This = impl_from_IStorage(iface);
IEnumSTATSTGImpl* newEnum;
- TRACE("(%p, %d, %p, %d, %p)\n",
- iface, reserved1, reserved2, reserved3, ppenum);
+ TRACE("%p, %ld, %p, %ld, %p.\n", iface, reserved1, reserved2, reserved3, ppenum);
if (!ppenum)
return E_INVALIDARG;
@@ -1792,8 +1789,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
DirEntry currentEntry;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %p, %x)\n",
- iface, pstatstg, grfStatFlag);
+ TRACE("%p, %p, %#lx.\n", iface, pstatstg, grfStatFlag);
if (!pstatstg)
{
@@ -1827,9 +1823,9 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
end:
if (res == S_OK)
{
- TRACE("<-- STATSTG: pwcsName: %s, type: %d, cbSize.Low/High: %d/%d, grfMode: %08x, grfLocksSupported: %d, grfStateBits: %08x\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.u.LowPart, pstatstg->cbSize.u.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);
+ TRACE("<-- STATSTG: pwcsName: %s, type: %ld, cbSize.Low/High: %ld/%ld, grfMode: %#lx, grfLocksSupported: %ld, grfStateBits: %#lx\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.u.LowPart, pstatstg->cbSize.u.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);
}
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1935,9 +1931,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
DirRef currentEntryRef, newStreamEntryRef;
HRESULT hr;
- TRACE("(%p, %s, %x, %d, %d, %p)\n",
- iface, debugstr_w(pwcsName), grfMode,
- reserved1, reserved2, ppstm);
+ TRACE("%p, %s, %#lx, %ld, %ld, %p.\n", iface, debugstr_w(pwcsName), grfMode, reserved1, reserved2, ppstm);
if (ppstm == 0)
return STG_E_INVALIDPOINTER;
@@ -2130,9 +2124,8 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
DirRef newEntryRef;
HRESULT hr;
- TRACE("(%p, %s, %x, %d, %d, %p)\n",
- iface, debugstr_w(pwcsName), grfMode,
- reserved1, reserved2, ppstg);
+ TRACE("%p, %s, %#lx, %ld, %ld, %p.\n", iface, debugstr_w(pwcsName), grfMode,
+ reserved1, reserved2, ppstg);
if (ppstg == 0)
return STG_E_INVALIDPOINTER;
@@ -2150,7 +2143,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
if ( FAILED( validateSTGM(grfMode) ) ||
(grfMode & STGM_DELETEONRELEASE) )
{
- WARN("bad grfMode: 0x%x\n", grfMode);
+ WARN("bad grfMode: %#lx\n", grfMode);
return STG_E_INVALIDFLAG;
}
@@ -2278,7 +2271,7 @@ static HRESULT StorageBaseImpl_CopyStorageEntryTo(StorageBaseImpl *This,
hr = StorageBaseImpl_CopyChildEntryTo( This, data.dirRootEntry, skip_storage,
skip_stream, snbExclude, pstgDest );
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2297,9 +2290,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
BOOL skip_storage = FALSE, skip_stream = FALSE;
DWORD i;
- TRACE("(%p, %d, %p, %p, %p)\n",
- iface, ciidExclude, rgiidExclude,
- snbExclude, pstgDest);
+ TRACE("%p, %ld, %p, %p, %p.\n", iface, ciidExclude, rgiidExclude, snbExclude, pstgDest);
if ( pstgDest == 0 )
return STG_E_INVALIDPOINTER;
@@ -2381,9 +2372,8 @@ static HRESULT WINAPI StorageBaseImpl_MoveElementTo(
const OLECHAR *pwcsNewName,/* [string][in] */
DWORD grfFlags) /* [in] */
{
- FIXME("(%p %s %p %s %u): stub\n", iface,
- debugstr_w(pwcsName), pstgDest,
- debugstr_w(pwcsNewName), grfFlags);
+ FIXME("%p, %s, %p, %s, %#lx: stub\n", iface, debugstr_w(pwcsName), pstgDest,
+ debugstr_w(pwcsNewName), grfFlags);
return E_NOTIMPL;
}
@@ -2400,7 +2390,7 @@ static HRESULT WINAPI StorageBaseImpl_Commit(
DWORD grfCommitFlags)/* [in] */
{
StorageBaseImpl* This = impl_from_IStorage(iface);
- TRACE("(%p %d)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
return StorageBaseImpl_Flush(This);
}
@@ -2435,7 +2425,7 @@ static HRESULT deleteStorageContents(
HRESULT destroyHr = S_OK;
StorageInternalImpl *stg, *stg2;
- TRACE("%p,%d\n", parentStorage, indexToDelete);
+ TRACE("%p, %ld.\n", parentStorage, indexToDelete);
/* Invalidate any open storage objects. */
LIST_FOR_EACH_ENTRY_SAFE(stg, stg2, &parentStorage->storageHead, StorageInternalImpl, ParentListEntry)
@@ -2460,7 +2450,7 @@ static HRESULT deleteStorageContents(
if (hr != S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2471,7 +2461,7 @@ static HRESULT deleteStorageContents(
if (FAILED(hr))
{
IStorage_Release(childStorage);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2499,7 +2489,7 @@ static HRESULT deleteStorageContents(
IStorage_Release(childStorage);
IEnumSTATSTG_Release(elements);
- TRACE("%08x\n", hr);
+ TRACE("%#lx\n", hr);
return destroyHr;
}
@@ -2539,7 +2529,7 @@ static HRESULT deleteStreamContents(
if (hr!=S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return(hr);
}
@@ -2550,7 +2540,7 @@ static HRESULT deleteStreamContents(
if(hr != S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2558,7 +2548,7 @@ static HRESULT deleteStreamContents(
* Release the stream object.
*/
IStream_Release(pis);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return S_OK;
}
@@ -2625,7 +2615,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
if (hr!=S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2646,7 +2636,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
if (SUCCEEDED(hr))
hr = StorageBaseImpl_Flush(This);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2995,7 +2985,7 @@ static HRESULT StorageImpl_LoadFileHeader(
This->smallBlockSize != DEF_SMALL_BLOCK_SIZE ||
This->smallBlockLimit != LIMIT_TO_USE_SMALL_BLOCK)
{
- FIXME("Broken OLE storage file? bigblock=0x%x, smallblock=0x%x, sblimit=0x%x\n",
+ FIXME("Broken OLE storage file? bigblock=%#lx, smallblock=%#lx, sblimit=%#lx\n",
This->bigBlockSize, This->smallBlockSize, This->smallBlockLimit);
hr = STG_E_INVALIDHEADER;
}
@@ -3676,7 +3666,7 @@ static BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
if (FAILED(resRead) || FAILED(resWrite))
{
- ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
+ ERR("conversion failed: resRead = %#lx, resWrite = %#lx\n", resRead, resWrite);
BlockChainStream_SetSize(bbTempChain, size);
BlockChainStream_Destroy(bbTempChain);
return NULL;
@@ -3781,7 +3771,7 @@ static SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks(
if(FAILED(resRead) || FAILED(resWrite))
{
- ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
+ ERR("conversion failed: resRead = %#lx, resWrite = %#lx\n", resRead, resWrite);
SmallBlockChainStream_SetSize(sbTempChain, size);
SmallBlockChainStream_Destroy(sbTempChain);
return NULL;
@@ -4010,8 +4000,7 @@ static HRESULT StorageImpl_GetNextBlockInChain(
if(depotBlockCount >= This->bigBlockDepotCount)
{
- WARN("depotBlockCount %d, bigBlockDepotCount %d\n", depotBlockCount,
- This->bigBlockDepotCount);
+ WARN("depotBlockCount %ld, bigBlockDepotCount %ld\n", depotBlockCount, This->bigBlockDepotCount);
return STG_E_READFAULT;
}
@@ -5476,7 +5465,7 @@ static HRESULT WINAPI StorageInternalImpl_Commit(
DWORD grfCommitFlags) /* [in] */
{
StorageBaseImpl* This = impl_from_IStorage(iface);
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
return StorageBaseImpl_Flush(This);
}
@@ -5942,7 +5931,7 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit(
zero.QuadPart = 0;
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
/* Cannot commit a read-only transacted storage */
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
@@ -6059,7 +6048,7 @@ end:
StorageBaseImpl_UnlockTransaction(This->transactedParent, TRUE);
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6152,7 +6141,7 @@ static HRESULT TransactedSnapshotImpl_CreateDirEntry(StorageBaseImpl *base,
*index = new_ref;
- TRACE("%s l=%x r=%x d=%x <-- %x\n", debugstr_w(newData->name), newData->leftChild, newData->rightChild, newData->dirRootEntry, *index);
+ TRACE("%s l=%lx r=%lx d=%lx <-- %lx\n", debugstr_w(newData->name), newData->leftChild, newData->rightChild, newData->dirRootEntry, *index);
return S_OK;
}
@@ -6163,12 +6152,12 @@ static HRESULT TransactedSnapshotImpl_WriteDirEntry(StorageBaseImpl *base,
TransactedSnapshotImpl* This = (TransactedSnapshotImpl*) base;
HRESULT hr;
- TRACE("%x %s l=%x r=%x d=%x\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
+ TRACE("%lx %s l=%lx r=%lx d=%lx\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6205,13 +6194,13 @@ static HRESULT TransactedSnapshotImpl_ReadDirEntry(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
memcpy(data, &This->entries[index].data, sizeof(DirEntry));
- TRACE("%x %s l=%x r=%x d=%x\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
+ TRACE("%lx %s l=%lx r=%lx d=%lx\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
return S_OK;
}
@@ -6271,14 +6260,14 @@ static HRESULT TransactedSnapshotImpl_StreamWriteAt(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
hr = TransactedSnapshotImpl_MakeStreamDirty(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6290,7 +6279,7 @@ static HRESULT TransactedSnapshotImpl_StreamWriteAt(StorageBaseImpl *base,
This->entries[index].data.size.QuadPart,
offset.QuadPart + size);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6303,7 +6292,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6346,7 +6335,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
if (SUCCEEDED(hr))
This->entries[index].data.size = newsize;
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6360,14 +6349,14 @@ static HRESULT TransactedSnapshotImpl_StreamLink(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, src);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
hr = TransactedSnapshotImpl_EnsureReadEntry(This, dst);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6656,7 +6645,7 @@ static HRESULT WINAPI TransactedSharedImpl_Commit(
HRESULT hr;
ULONG transactionSig;
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx\n", iface, grfCommitFlags);
/* Cannot commit a read-only transacted storage */
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
@@ -6724,7 +6713,7 @@ static HRESULT WINAPI TransactedSharedImpl_Commit(
This->lastTransactionSig = transactionSig+1;
}
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6862,7 +6851,7 @@ static HRESULT Storage_ConstructTransacted(StorageBaseImpl *parentStorage,
if (parentStorage->openFlags & fixme_flags)
{
fixme_flags &= ~parentStorage->openFlags;
- FIXME("Unimplemented flags %x\n", parentStorage->openFlags);
+ FIXME("Unimplemented flags %lx\n", parentStorage->openFlags);
}
if (toplevel && !(parentStorage->openFlags & STGM_NOSNAPSHOT) &&
@@ -7590,7 +7579,7 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This,
HRESULT hr;
BlockChainBlock *cachedBlock;
- TRACE("(%p)-> %i %p %i %p\n",This, offset.u.LowPart, buffer, size, bytesRead);
+ TRACE("%p, %li, %p, %lu, %p.\n",This, offset.u.LowPart, buffer, size, bytesRead);
/*
* Find the first block in the stream that contains part of the buffer.
@@ -8581,7 +8570,7 @@ static HRESULT create_storagefile(
IStorage_Release(&newStorage->IStorage_iface);
end:
- TRACE("<-- %p r = %08x\n", *ppstgOpen, hr);
+ TRACE("<-- %p r = %#lx\n", *ppstgOpen, hr);
return hr;
}
@@ -8613,9 +8602,7 @@ HRESULT WINAPI StgCreateDocfile(
{
STGOPTIONS stgoptions = {1, 0, 512};
- TRACE("(%s, %x, %d, %p)\n",
- debugstr_w(pwcsName), grfMode,
- reserved, ppstgOpen);
+ TRACE("%s, %#lx, %ld, %p.\n", debugstr_w(pwcsName), grfMode, reserved, ppstgOpen);
if (ppstgOpen == 0)
return STG_E_INVALIDPOINTER;
@@ -8630,7 +8617,7 @@ HRESULT WINAPI StgCreateDocfile(
*/
HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
{
- TRACE("(%s, %x, %x, %x, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ TRACE("%s, %#lx, %#lx, %#lx, %p, %p, %p, %p.\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
if (stgfmt != STGFMT_FILE && grfAttrs != 0)
@@ -8670,7 +8657,7 @@ HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD st
HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved,
IPropertySetStorage **propset)
{
- TRACE("(%p, 0x%x, %p)\n", pstg, reserved, propset);
+ TRACE("%p, %#lx, %p.\n", pstg, reserved, propset);
if (reserved)
return STG_E_INVALIDPARAMETER;
@@ -8682,7 +8669,7 @@ HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved,
*/
HRESULT WINAPI StgOpenStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
{
- TRACE("(%s, %x, %x, %x, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ TRACE("%s, %#lx, %#lx, %#lx, %p, %p, %p, %p.\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
if (stgfmt != STGFMT_DOCFILE && grfAttrs != 0)
@@ -8739,9 +8726,8 @@ HRESULT WINAPI StgOpenStorage(
DWORD accessMode;
LPWSTR temp_name = NULL;
- TRACE("(%s, %p, %x, %p, %d, %p)\n",
- debugstr_w(pwcsName), pstgPriority, grfMode,
- snbExclude, reserved, ppstgOpen);
+ TRACE("%s, %p, %#lx, %p, %ld, %p.\n", debugstr_w(pwcsName), pstgPriority, grfMode,
+ snbExclude, reserved, ppstgOpen);
if (pstgPriority)
{
@@ -8908,7 +8894,7 @@ HRESULT WINAPI StgOpenStorage(
end:
CoTaskMemFree(temp_name);
if (pstgPriority) IStorage_Release(pstgPriority);
- TRACE("<-- %08x, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
+ TRACE("<-- %#lx, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
return hr;
}
@@ -9242,7 +9228,7 @@ static HRESULT STREAM_ReadString( IStream *stm, LPWSTR *string )
if( count != sizeof(len) )
return E_OUTOFMEMORY;
- TRACE("%d bytes\n",len);
+ TRACE("%ld bytes\n",len);
str = CoTaskMemAlloc( len );
if( !str )
@@ -9381,7 +9367,7 @@ HRESULT WINAPI ReadFmtUserTypeStg (LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lp
r = IStorage_OpenStream( pstg, L"\1CompObj", NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm );
if( FAILED ( r ) )
{
- WARN("Failed to open stream r = %08x\n", r);
+ WARN("Failed to open stream r = %#lx\n", r);
return r;
}
@@ -10576,7 +10562,7 @@ enum stream_1ole_flags {
HRESULT WINAPI OleConvertIStorageToOLESTREAMEx ( LPSTORAGE stg, CLIPFORMAT cf, LONG width, LONG height,
DWORD size, LPSTGMEDIUM medium, LPOLESTREAM olestream )
{
- FIXME("%p %x %d %d %d %p %p stub\n", stg, cf, width, height, size, medium, olestream);
+ FIXME("%p, %x, %ld, %ld, %ld, %p, %p: stub\n", stg, cf, width, height, size, medium, olestream);
return E_NOTIMPL;
}
@@ -10604,7 +10590,7 @@ HRESULT WINAPI GetConvertStg(IStorage *stg)
if (header[0] != version_magic)
{
- ERR("got wrong version magic for 1Ole stream, 0x%08x\n", header[0]);
+ ERR("got wrong version magic for 1Ole stream, %#lx.\n", header[0]);
return E_FAIL;
}
diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index c58053489be..9a8ab431ea0 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -106,7 +106,7 @@ ULONG __RPC_USER HMETAFILE_UserSize(ULONG *pFlags, ULONG StartingSize, HMETAFILE
{
ULONG size = StartingSize;
- TRACE("(%s, %d, &%p\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
+ TRACE("%s, %lu, &%p.\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
ALIGN_LENGTH(size, 3);
@@ -302,7 +302,7 @@ void __RPC_USER HMETAFILE_UserFree(ULONG *pFlags, HMETAFILE *phmf)
*/
ULONG __RPC_USER HENHMETAFILE_UserSize(ULONG *pFlags, ULONG size, HENHMETAFILE *phEmf)
{
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), size, *phEmf);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), size, *phEmf);
ALIGN_LENGTH(size, 3);
@@ -498,7 +498,7 @@ void __RPC_USER HENHMETAFILE_UserFree(ULONG *pFlags, HENHMETAFILE *phEmf)
*/
ULONG __RPC_USER HMETAFILEPICT_UserSize(ULONG *pFlags, ULONG size, HMETAFILEPICT *phMfp)
{
- TRACE("(%s, %d, &%p)\n", debugstr_user_flags(pFlags), size, *phMfp);
+ TRACE("%s, %lu, &%p.\n", debugstr_user_flags(pFlags), size, *phMfp);
ALIGN_LENGTH(size, 3);
@@ -721,7 +721,7 @@ ULONG __RPC_USER STGMEDIUM_UserSize(ULONG *pFlags, ULONG StartingSize, STGMEDIUM
{
ULONG size = StartingSize;
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
ALIGN_LENGTH(size, 3);
@@ -961,7 +961,7 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char
pBuffer += sizeof(DWORD);
if (*(DWORD *)pBuffer != 0)
{
- ERR("invalid offset %d\n", *(DWORD *)pBuffer);
+ ERR("invalid offset %ld\n", *(DWORD *)pBuffer);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
@@ -970,14 +970,13 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char
pBuffer += sizeof(DWORD);
if (conformance != variance)
{
- ERR("conformance (%d) and variance (%d) should be equal\n",
- conformance, variance);
+ ERR("conformance (%ld) and variance (%ld) should be equal\n", conformance, variance);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
if (conformance > 0x7fffffff)
{
- ERR("conformance 0x%x too large\n", conformance);
+ ERR("conformance %#lx too large\n", conformance);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
@@ -1141,7 +1140,7 @@ ULONG __RPC_USER SNB_UserSize(ULONG *pFlags, ULONG StartingSize, SNB *pSnb)
{
ULONG size = StartingSize;
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
ALIGN_LENGTH(size, 3);
@@ -1305,7 +1304,7 @@ HRESULT CALLBACK IEnumUnknown_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumUnknown_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1317,7 +1316,7 @@ HRESULT __RPC_STUB IEnumUnknown_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumUnknown_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1363,7 +1362,7 @@ HRESULT CALLBACK IEnumMoniker_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumMoniker_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1375,7 +1374,7 @@ HRESULT __RPC_STUB IEnumMoniker_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumMoniker_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1449,7 +1448,7 @@ HRESULT CALLBACK IEnumString_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumString_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1461,7 +1460,7 @@ HRESULT __RPC_STUB IEnumString_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumString_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1477,7 +1476,7 @@ HRESULT CALLBACK ISequentialStream_Read_Proxy(
ULONG read;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbRead);
hr = ISequentialStream_RemoteRead_Proxy(This, pv, cb, &read);
if(pcbRead) *pcbRead = read;
@@ -1491,7 +1490,7 @@ HRESULT __RPC_STUB ISequentialStream_Read_Stub(
ULONG cb,
ULONG *pcbRead)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbRead);
return ISequentialStream_Read(This, pv, cb, pcbRead);
}
@@ -1504,7 +1503,7 @@ HRESULT CALLBACK ISequentialStream_Write_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
hr = ISequentialStream_RemoteWrite_Proxy(This, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1518,7 +1517,7 @@ HRESULT __RPC_STUB ISequentialStream_Write_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
return ISequentialStream_Write(This, pv, cb, pcbWritten);
}
@@ -1531,7 +1530,7 @@ HRESULT CALLBACK IStream_Seek_Proxy(
ULARGE_INTEGER newpos;
HRESULT hr;
- TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ TRACE("%p, %s, %ld, %p.\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
hr = IStream_RemoteSeek_Proxy(This, dlibMove, dwOrigin, &newpos);
if(plibNewPosition) *plibNewPosition = newpos;
@@ -1545,7 +1544,7 @@ HRESULT __RPC_STUB IStream_Seek_Stub(
DWORD dwOrigin,
ULARGE_INTEGER *plibNewPosition)
{
- TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ TRACE("%p, %s, %ld, %p.\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
return IStream_Seek(This, dlibMove, dwOrigin, plibNewPosition);
}
@@ -1587,7 +1586,7 @@ HRESULT CALLBACK IEnumSTATSTG_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumSTATSTG_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1599,7 +1598,7 @@ HRESULT __RPC_STUB IEnumSTATSTG_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumSTATSTG_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1614,7 +1613,7 @@ HRESULT CALLBACK IStorage_OpenStream_Proxy(
DWORD reserved2,
IStream **ppstm)
{
- TRACE("(%p)->(%s, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
+ TRACE("%p, %s, %p, %#lx, %ld, %p.\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
if(reserved1) WARN("reserved1 %p\n", reserved1);
return IStorage_RemoteOpenStream_Proxy(This, pwcsName, 0, NULL, grfMode, reserved2, ppstm);
@@ -1629,8 +1628,8 @@ HRESULT __RPC_STUB IStorage_OpenStream_Stub(
DWORD reserved2,
IStream **ppstm)
{
- TRACE("(%p)->(%s, %d, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
- if(cbReserved1 || reserved1) WARN("cbReserved1 %d reserved1 %p\n", cbReserved1, reserved1);
+ TRACE("%p, %s, %ld, %p, %#lx, %ld, %p.\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
+ if(cbReserved1 || reserved1) WARN("cbReserved1 %ld reserved1 %p\n", cbReserved1, reserved1);
return IStorage_OpenStream(This, pwcsName, NULL, grfMode, reserved2, ppstm);
}
@@ -1642,7 +1641,7 @@ HRESULT CALLBACK IStorage_EnumElements_Proxy(
DWORD reserved3,
IEnumSTATSTG **ppenum)
{
- TRACE("(%p)->(%d, %p, %d, %p)\n", This, reserved1, reserved2, reserved3, ppenum);
+ TRACE("%p, %ld, %p, %ld, %p.\n", This, reserved1, reserved2, reserved3, ppenum);
if(reserved2) WARN("reserved2 %p\n", reserved2);
return IStorage_RemoteEnumElements_Proxy(This, reserved1, 0, NULL, reserved3, ppenum);
@@ -1656,8 +1655,8 @@ HRESULT __RPC_STUB IStorage_EnumElements_Stub(
DWORD reserved3,
IEnumSTATSTG **ppenum)
{
- TRACE("(%p)->(%d, %d, %p, %d, %p)\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
- if(cbReserved2 || reserved2) WARN("cbReserved2 %d reserved2 %p\n", cbReserved2, reserved2);
+ TRACE("%p, %ld, %ld, %p, %ld, %p.\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
+ if(cbReserved2 || reserved2) WARN("cbReserved2 %ld reserved2 %p\n", cbReserved2, reserved2);
return IStorage_EnumElements(This, reserved1, NULL, reserved3, ppenum);
}
@@ -1672,7 +1671,7 @@ HRESULT CALLBACK ILockBytes_ReadAt_Proxy(
ULONG read;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
hr = ILockBytes_RemoteReadAt_Proxy(This, ulOffset, pv, cb, &read);
if(pcbRead) *pcbRead = read;
@@ -1687,7 +1686,7 @@ HRESULT __RPC_STUB ILockBytes_ReadAt_Stub(
ULONG cb,
ULONG *pcbRead)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
return ILockBytes_ReadAt(This, ulOffset, pv, cb, pcbRead);
}
@@ -1701,7 +1700,7 @@ HRESULT CALLBACK ILockBytes_WriteAt_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
hr = ILockBytes_RemoteWriteAt_Proxy(This, ulOffset, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1716,7 +1715,7 @@ HRESULT __RPC_STUB ILockBytes_WriteAt_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
return ILockBytes_WriteAt(This, ulOffset, pv, cb, pcbWritten);
}
@@ -1729,7 +1728,7 @@ HRESULT CALLBACK IFillLockBytes_FillAppend_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
hr = IFillLockBytes_RemoteFillAppend_Proxy(This, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1743,7 +1742,7 @@ HRESULT __RPC_STUB IFillLockBytes_FillAppend_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
return IFillLockBytes_FillAppend(This, pv, cb, pcbWritten);
}
@@ -1757,7 +1756,7 @@ HRESULT CALLBACK IFillLockBytes_FillAt_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
hr = IFillLockBytes_RemoteFillAt_Proxy(This, ulOffset, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1772,7 +1771,7 @@ HRESULT __RPC_STUB IFillLockBytes_FillAt_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %ld, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
return IFillLockBytes_FillAt(This, ulOffset, pv, cb, pcbWritten);
}
@@ -1807,7 +1806,7 @@ HRESULT CALLBACK IEnumSTATDATA_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %ld, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumSTATDATA_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1819,7 +1818,7 @@ HRESULT __RPC_STUB IEnumSTATDATA_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumSTATDATA_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1850,7 +1849,7 @@ void CALLBACK IAdviseSink_OnViewChange_Proxy(
DWORD dwAspect,
LONG lindex)
{
- TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
+ TRACE("%p, %ld, %ld.\n", This, dwAspect, lindex);
IAdviseSink_RemoteOnViewChange_Proxy(This, dwAspect, lindex);
}
@@ -1859,7 +1858,7 @@ HRESULT __RPC_STUB IAdviseSink_OnViewChange_Stub(
DWORD dwAspect,
LONG lindex)
{
- TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
+ TRACE("%p, %ld, %ld.\n", This, dwAspect, lindex);
IAdviseSink_OnViewChange(This, dwAspect, lindex);
return S_OK;
}
@@ -2054,7 +2053,7 @@ HRESULT CALLBACK IOleCache2_UpdateCache_Proxy(
DWORD grfUpdf,
LPVOID pReserved)
{
- TRACE("(%p, %p, 0x%08x, %p)\n", This, pDataObject, grfUpdf, pReserved);
+ TRACE("%p, %p, %#lx, %p.\n", This, pDataObject, grfUpdf, pReserved);
return IOleCache2_RemoteUpdateCache_Proxy(This, pDataObject, grfUpdf, (LONG_PTR)pReserved);
}
@@ -2064,7 +2063,7 @@ HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub(
DWORD grfUpdf,
LONG_PTR pReserved)
{
- TRACE("(%p, %p, 0x%08x, %li)\n", This, pDataObject, grfUpdf, pReserved);
+ TRACE("%p, %p, %#lx, %Id.\n", This, pDataObject, grfUpdf, pReserved);
return IOleCache2_UpdateCache(This, pDataObject, grfUpdf, (void*)pReserved);
}
@@ -2075,7 +2074,7 @@ HRESULT CALLBACK IEnumOLEVERB_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumOLEVERB_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -2087,7 +2086,7 @@ HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumOLEVERB_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
--
2.34.1
2
1