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
[PATCH 1/2] mfreadwrite/reader: Use separate refcount for events callbacks.
by Nikolay Sivov Feb. 11, 2022
by Nikolay Sivov Feb. 11, 2022
Feb. 11, 2022
From: Rémi Bernon <rbernon(a)codeweavers.com>
This resolves circular dependency, with source and streams holding
references to the callbacks, subscribed to their event queues.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
Replaces 226173.
dlls/mfreadwrite/reader.c | 91 ++++++++++++++++++++-------------
dlls/mfreadwrite/tests/mfplat.c | 3 +-
2 files changed, 58 insertions(+), 36 deletions(-)
diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c
index 6d35a59f3a8..0b6c6fa8583 100644
--- a/dlls/mfreadwrite/reader.c
+++ b/dlls/mfreadwrite/reader.c
@@ -154,6 +154,7 @@ struct source_reader
IMFAsyncCallback stream_events_callback;
IMFAsyncCallback async_commands_callback;
LONG refcount;
+ LONG public_refcount;
IMFMediaSource *source;
IMFPresentationDescriptor *descriptor;
IMFSourceReaderCallback *async_callback;
@@ -203,6 +204,51 @@ static struct media_stream *impl_stream_from_IMFVideoSampleAllocatorNotify(IMFVi
return CONTAINING_RECORD(iface, struct media_stream, notify_cb);
}
+static void source_reader_release_responses(struct source_reader *reader, struct media_stream *stream);
+
+static ULONG source_reader_addref(struct source_reader *reader)
+{
+ return InterlockedIncrement(&reader->refcount);
+}
+
+static ULONG source_reader_release(struct source_reader *reader)
+{
+ ULONG refcount = InterlockedDecrement(&reader->refcount);
+ unsigned int i;
+
+ if (!refcount)
+ {
+ if (reader->async_callback)
+ IMFSourceReaderCallback_Release(reader->async_callback);
+ if (reader->descriptor)
+ IMFPresentationDescriptor_Release(reader->descriptor);
+ if (reader->attributes)
+ IMFAttributes_Release(reader->attributes);
+ IMFMediaSource_Release(reader->source);
+
+ for (i = 0; i < reader->stream_count; ++i)
+ {
+ struct media_stream *stream = &reader->streams[i];
+
+ if (stream->stream)
+ IMFMediaStream_Release(stream->stream);
+ if (stream->current)
+ IMFMediaType_Release(stream->current);
+ if (stream->decoder.transform)
+ IMFTransform_Release(stream->decoder.transform);
+ if (stream->allocator)
+ IMFVideoSampleAllocatorEx_Release(stream->allocator);
+ }
+ source_reader_release_responses(reader, NULL);
+ free(reader->streams);
+ MFUnlockWorkQueue(reader->queue);
+ DeleteCriticalSection(&reader->cs);
+ free(reader);
+ }
+
+ return refcount;
+}
+
static HRESULT WINAPI source_reader_async_command_QueryInterface(IUnknown *iface, REFIID riid, void **obj)
{
if (IsEqualIID(riid, &IID_IUnknown))
@@ -325,13 +371,13 @@ static HRESULT WINAPI source_reader_callback_QueryInterface(IMFAsyncCallback *if
static ULONG WINAPI source_reader_source_events_callback_AddRef(IMFAsyncCallback *iface)
{
struct source_reader *reader = impl_from_source_callback_IMFAsyncCallback(iface);
- return IMFSourceReader_AddRef(&reader->IMFSourceReader_iface);
+ return source_reader_addref(reader);
}
static ULONG WINAPI source_reader_source_events_callback_Release(IMFAsyncCallback *iface)
{
struct source_reader *reader = impl_from_source_callback_IMFAsyncCallback(iface);
- return IMFSourceReader_Release(&reader->IMFSourceReader_iface);
+ return source_reader_release(reader);
}
static HRESULT WINAPI source_reader_callback_GetParameters(IMFAsyncCallback *iface,
@@ -611,13 +657,13 @@ static const IMFAsyncCallbackVtbl source_events_callback_vtbl =
static ULONG WINAPI source_reader_stream_events_callback_AddRef(IMFAsyncCallback *iface)
{
struct source_reader *reader = impl_from_stream_callback_IMFAsyncCallback(iface);
- return IMFSourceReader_AddRef(&reader->IMFSourceReader_iface);
+ return source_reader_addref(reader);
}
static ULONG WINAPI source_reader_stream_events_callback_Release(IMFAsyncCallback *iface)
{
struct source_reader *reader = impl_from_stream_callback_IMFAsyncCallback(iface);
- return IMFSourceReader_Release(&reader->IMFSourceReader_iface);
+ return source_reader_release(reader);
}
static HRESULT source_reader_pull_stream_samples(struct source_reader *reader, struct media_stream *stream)
@@ -888,13 +934,13 @@ static const IMFAsyncCallbackVtbl stream_events_callback_vtbl =
static ULONG WINAPI source_reader_async_commands_callback_AddRef(IMFAsyncCallback *iface)
{
struct source_reader *reader = impl_from_async_commands_callback_IMFAsyncCallback(iface);
- return IMFSourceReader_AddRef(&reader->IMFSourceReader_iface);
+ return source_reader_addref(reader);
}
static ULONG WINAPI source_reader_async_commands_callback_Release(IMFAsyncCallback *iface)
{
struct source_reader *reader = impl_from_async_commands_callback_IMFAsyncCallback(iface);
- return IMFSourceReader_Release(&reader->IMFSourceReader_iface);
+ return source_reader_release(reader);
}
static struct stream_response * media_stream_detach_response(struct source_reader *reader, struct stream_response *response)
@@ -1326,7 +1372,7 @@ static HRESULT WINAPI src_reader_QueryInterface(IMFSourceReader *iface, REFIID r
static ULONG WINAPI src_reader_AddRef(IMFSourceReader *iface)
{
struct source_reader *reader = impl_from_IMFSourceReader(iface);
- ULONG refcount = InterlockedIncrement(&reader->refcount);
+ ULONG refcount = InterlockedIncrement(&reader->public_refcount);
TRACE("%p, refcount %u.\n", iface, refcount);
@@ -1336,41 +1382,15 @@ static ULONG WINAPI src_reader_AddRef(IMFSourceReader *iface)
static ULONG WINAPI src_reader_Release(IMFSourceReader *iface)
{
struct source_reader *reader = impl_from_IMFSourceReader(iface);
- ULONG refcount = InterlockedDecrement(&reader->refcount);
- unsigned int i;
+ ULONG refcount = InterlockedDecrement(&reader->public_refcount);
TRACE("%p, refcount %u.\n", iface, refcount);
if (!refcount)
{
- if (reader->async_callback)
- IMFSourceReaderCallback_Release(reader->async_callback);
if (reader->flags & SOURCE_READER_SHUTDOWN_ON_RELEASE)
IMFMediaSource_Shutdown(reader->source);
- if (reader->descriptor)
- IMFPresentationDescriptor_Release(reader->descriptor);
- if (reader->attributes)
- IMFAttributes_Release(reader->attributes);
- IMFMediaSource_Release(reader->source);
-
- for (i = 0; i < reader->stream_count; ++i)
- {
- struct media_stream *stream = &reader->streams[i];
-
- if (stream->stream)
- IMFMediaStream_Release(stream->stream);
- if (stream->current)
- IMFMediaType_Release(stream->current);
- if (stream->decoder.transform)
- IMFTransform_Release(stream->decoder.transform);
- if (stream->allocator)
- IMFVideoSampleAllocatorEx_Release(stream->allocator);
- }
- source_reader_release_responses(reader, NULL);
- free(reader->streams);
- MFUnlockWorkQueue(reader->queue);
- DeleteCriticalSection(&reader->cs);
- free(reader);
+ source_reader_release(reader);
}
return refcount;
@@ -2268,6 +2288,7 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
object->source_events_callback.lpVtbl = &source_events_callback_vtbl;
object->stream_events_callback.lpVtbl = &stream_events_callback_vtbl;
object->async_commands_callback.lpVtbl = &async_commands_callback_vtbl;
+ object->public_refcount = 1;
object->refcount = 1;
list_init(&object->responses);
if (shutdown_on_release)
diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c
index f484925b28a..8417a0d37b7 100644
--- a/dlls/mfreadwrite/tests/mfplat.c
+++ b/dlls/mfreadwrite/tests/mfplat.c
@@ -862,7 +862,8 @@ skip_read_sample:
hr = IMFSourceReader_Flush(reader, MF_SOURCE_READER_ALL_STREAMS);
ok(hr == S_OK, "Failed to flush all streams, hr %#x.\n", hr);
- IMFSourceReader_Release(reader);
+ refcount = IMFSourceReader_Release(reader);
+ ok(!refcount, "Unexpected refcount %u.\n", refcount);
/* Async mode. */
callback = create_async_callback();
--
2.34.1
1
1
Feb. 11, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfmediaengine/Makefile.in | 1 -
dlls/mfmediaengine/main.c | 70 +++++++++++++++++-----------------
2 files changed, 35 insertions(+), 36 deletions(-)
diff --git a/dlls/mfmediaengine/Makefile.in b/dlls/mfmediaengine/Makefile.in
index e410f31a99b..a0e944c0633 100644
--- a/dlls/mfmediaengine/Makefile.in
+++ b/dlls/mfmediaengine/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = mfmediaengine.dll
IMPORTS = oleaut32 ole32 mfplat mf mfuuid dxguid uuid
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c
index 5bfb35efbac..31aee0209f6 100644
--- a/dlls/mfmediaengine/main.c
+++ b/dlls/mfmediaengine/main.c
@@ -209,7 +209,7 @@ static HRESULT media_engine_lock_d3d_device(struct media_engine *engine, ID3D11D
{
if (FAILED(hr = IMFDXGIDeviceManager_OpenDeviceHandle(engine->device_manager, &engine->device_handle)))
{
- WARN("Failed to open device handle, hr %#x.\n", hr);
+ WARN("Failed to open device handle, hr %#lx.\n", hr);
return hr;
}
}
@@ -225,7 +225,7 @@ static HRESULT media_engine_lock_d3d_device(struct media_engine *engine, ID3D11D
if (FAILED(hr = IMFDXGIDeviceManager_OpenDeviceHandle(engine->device_manager, &engine->device_handle)))
{
- WARN("Failed to open a device handle, hr %#x.\n", hr);
+ WARN("Failed to open a device handle, hr %#lx.\n", hr);
return hr;
}
hr = IMFDXGIDeviceManager_LockDevice(engine->device_manager, engine->device_handle, &IID_ID3D11Device,
@@ -335,7 +335,7 @@ static HRESULT media_engine_create_d3d11_video_frame_resources(struct media_engi
if (FAILED(hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &engine->video_frame.d3d11.vb)))
{
- WARN("Failed to create a vertex buffer, hr %#x.\n", hr);
+ WARN("Failed to create a vertex buffer, hr %#lx.\n", hr);
goto failed;
}
@@ -344,7 +344,7 @@ static HRESULT media_engine_create_d3d11_video_frame_resources(struct media_engi
if (FAILED(hr = ID3D11Device_CreateBuffer(device, &buffer_desc, NULL, &engine->video_frame.d3d11.ps_cb)))
{
- WARN("Failed to create a buffer, hr %#x.\n", hr);
+ WARN("Failed to create a buffer, hr %#lx.\n", hr);
goto failed;
}
@@ -363,14 +363,14 @@ static HRESULT media_engine_create_d3d11_video_frame_resources(struct media_engi
if (FAILED(hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &engine->video_frame.d3d11.source)))
{
- WARN("Failed to create source texture, hr %#x.\n", hr);
+ WARN("Failed to create source texture, hr %#lx.\n", hr);
goto failed;
}
if (FAILED(hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)engine->video_frame.d3d11.source,
NULL, &engine->video_frame.d3d11.srv)))
{
- WARN("Failed to create SRV, hr %#x.\n", hr);
+ WARN("Failed to create SRV, hr %#lx.\n", hr);
goto failed;
}
@@ -383,7 +383,7 @@ static HRESULT media_engine_create_d3d11_video_frame_resources(struct media_engi
if (FAILED(hr = ID3D11Device_CreateSamplerState(device, &sampler_desc, &engine->video_frame.d3d11.sampler)))
{
- WARN("Failed to create a sampler state, hr %#x.\n", hr);
+ WARN("Failed to create a sampler state, hr %#lx.\n", hr);
goto failed;
}
@@ -391,20 +391,20 @@ static HRESULT media_engine_create_d3d11_video_frame_resources(struct media_engi
if (FAILED(hr = ID3D11Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code),
&engine->video_frame.d3d11.input_layout)))
{
- WARN("Failed to create input layout, hr %#x.\n", hr);
+ WARN("Failed to create input layout, hr %#lx.\n", hr);
goto failed;
}
/* Shaders */
if (FAILED(hr = ID3D11Device_CreateVertexShader(device, vs_code, sizeof(vs_code), NULL, &engine->video_frame.d3d11.vs)))
{
- WARN("Failed to create the vertex shader, hr %#x.\n", hr);
+ WARN("Failed to create the vertex shader, hr %#lx.\n", hr);
goto failed;
}
if (FAILED(hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &engine->video_frame.d3d11.ps)))
{
- WARN("Failed to create the pixel shader, hr %#x.\n", hr);
+ WARN("Failed to create the pixel shader, hr %#lx.\n", hr);
goto failed;
}
@@ -469,7 +469,7 @@ static ULONG WINAPI media_error_AddRef(IMFMediaError *iface)
struct media_error *me = impl_from_IMFMediaError(iface);
ULONG refcount = InterlockedIncrement(&me->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -479,7 +479,7 @@ static ULONG WINAPI media_error_Release(IMFMediaError *iface)
struct media_error *me = impl_from_IMFMediaError(iface);
ULONG refcount = InterlockedDecrement(&me->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
free(me);
@@ -519,7 +519,7 @@ static HRESULT WINAPI media_error_SetExtendedErrorCode(IMFMediaError *iface, HRE
{
struct media_error *me = impl_from_IMFMediaError(iface);
- TRACE("%p, %#x.\n", iface, code);
+ TRACE("%p, %#lx.\n", iface, code);
me->extended_code = code;
@@ -576,7 +576,7 @@ static ULONG WINAPI time_range_AddRef(IMFMediaTimeRange *iface)
struct time_range *range = impl_from_IMFMediaTimeRange(iface);
ULONG refcount = InterlockedIncrement(&range->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -586,7 +586,7 @@ static ULONG WINAPI time_range_Release(IMFMediaTimeRange *iface)
struct time_range *range = impl_from_IMFMediaTimeRange(iface);
ULONG refcount = InterlockedDecrement(&range->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -610,7 +610,7 @@ static HRESULT WINAPI time_range_GetStart(IMFMediaTimeRange *iface, DWORD idx, d
{
struct time_range *range = impl_from_IMFMediaTimeRange(iface);
- TRACE("%p, %u, %p.\n", iface, idx, start);
+ TRACE("%p, %lu, %p.\n", iface, idx, start);
if (idx >= range->count)
return E_INVALIDARG;
@@ -624,7 +624,7 @@ static HRESULT WINAPI time_range_GetEnd(IMFMediaTimeRange *iface, DWORD idx, dou
{
struct time_range *range = impl_from_IMFMediaTimeRange(iface);
- TRACE("%p, %u, %p.\n", iface, idx, end);
+ TRACE("%p, %lu, %p.\n", iface, idx, end);
if (idx >= range->count)
return E_INVALIDARG;
@@ -814,7 +814,7 @@ static void media_engine_get_frame_size(struct media_engine *engine, IMFTopology
IMFMediaTypeHandler_Release(handler);
if (FAILED(hr))
{
- WARN("Failed to get current media type %#x.\n", hr);
+ WARN("Failed to get current media type %#lx.\n", hr);
return;
}
@@ -873,13 +873,13 @@ static HRESULT WINAPI media_engine_session_events_Invoke(IMFAsyncCallback *iface
if (FAILED(hr = IMFMediaSession_EndGetEvent(engine->session, result, &event)))
{
- WARN("Failed to get session event, hr %#x.\n", hr);
+ WARN("Failed to get session event, hr %#lx.\n", hr);
goto failed;
}
if (FAILED(hr = IMFMediaEvent_GetType(event, &event_type)))
{
- WARN("Failed to get event type, hr %#x.\n", hr);
+ WARN("Failed to get event type, hr %#lx.\n", hr);
goto failed;
}
@@ -955,7 +955,7 @@ failed:
IMFMediaEvent_Release(event);
if (FAILED(hr = IMFMediaSession_BeginGetEvent(engine->session, iface, NULL)))
- WARN("Failed to subscribe to session events, hr %#x.\n", hr);
+ WARN("Failed to subscribe to session events, hr %#lx.\n", hr);
return S_OK;
}
@@ -1086,7 +1086,7 @@ static HRESULT media_engine_create_topology(struct media_engine *engine, IMFMedi
return hr;
if (FAILED(hr = IMFPresentationDescriptor_GetStreamDescriptorCount(pd, &stream_count)))
- WARN("Failed to get stream count, hr %#x.\n", hr);
+ WARN("Failed to get stream count, hr %#lx.\n", hr);
/* Enable first video stream and first audio stream. */
@@ -1154,10 +1154,10 @@ static HRESULT media_engine_create_topology(struct media_engine *engine, IMFMedi
if (sd_audio)
{
if (FAILED(hr = media_engine_create_source_node(source, pd, sd_audio, &audio_src)))
- WARN("Failed to create audio source node, hr %#x.\n", hr);
+ WARN("Failed to create audio source node, hr %#lx.\n", hr);
if (FAILED(hr = media_engine_create_audio_renderer(engine, &sar_node)))
- WARN("Failed to create audio renderer node, hr %#x.\n", hr);
+ WARN("Failed to create audio renderer node, hr %#lx.\n", hr);
if (sar_node && audio_src)
{
@@ -1175,10 +1175,10 @@ static HRESULT media_engine_create_topology(struct media_engine *engine, IMFMedi
if (SUCCEEDED(hr) && sd_video)
{
if (FAILED(hr = media_engine_create_source_node(source, pd, sd_video, &video_src)))
- WARN("Failed to create video source node, hr %#x.\n", hr);
+ WARN("Failed to create video source node, hr %#lx.\n", hr);
if (FAILED(hr = media_engine_create_video_renderer(engine, &grabber_node)))
- WARN("Failed to create video grabber node, hr %#x.\n", hr);
+ WARN("Failed to create video grabber node, hr %#lx.\n", hr);
if (grabber_node && video_src)
{
@@ -1249,7 +1249,7 @@ static HRESULT WINAPI media_engine_load_handler_Invoke(IMFAsyncCallback *iface,
hr = IMFSourceResolver_EndCreateObjectFromURL(engine->resolver, result, &obj_type, &object);
if (FAILED(hr))
- WARN("Failed to create source object, hr %#x.\n", hr);
+ WARN("Failed to create source object, hr %#lx.\n", hr);
if (object)
{
@@ -1322,7 +1322,7 @@ static ULONG WINAPI media_engine_AddRef(IMFMediaEngineEx *iface)
struct media_engine *engine = impl_from_IMFMediaEngineEx(iface);
ULONG refcount = InterlockedIncrement(&engine->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1356,7 +1356,7 @@ static ULONG WINAPI media_engine_Release(IMFMediaEngineEx *iface)
struct media_engine *engine = impl_from_IMFMediaEngineEx(iface);
ULONG refcount = InterlockedDecrement(&engine->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
free_media_engine(engine);
@@ -2187,7 +2187,7 @@ static HRESULT media_engine_transfer_to_d3d11_texture(struct media_engine *engin
if (FAILED(hr = media_engine_create_d3d11_video_frame_resources(engine, device)))
{
- WARN("Failed to create d3d resources, hr %#x.\n", hr);
+ WARN("Failed to create d3d resources, hr %#lx.\n", hr);
goto done;
}
@@ -2206,7 +2206,7 @@ static HRESULT media_engine_transfer_to_d3d11_texture(struct media_engine *engin
if (FAILED(hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv)))
{
- WARN("Failed to create an rtv, hr %#x.\n", hr);
+ WARN("Failed to create an rtv, hr %#lx.\n", hr);
goto done;
}
@@ -2456,21 +2456,21 @@ static HRESULT WINAPI media_engine_GetNumberOfStreams(IMFMediaEngineEx *iface, D
static HRESULT WINAPI media_engine_GetStreamAttribute(IMFMediaEngineEx *iface, DWORD stream_index, REFGUID attribute,
PROPVARIANT *value)
{
- FIXME("%p, %d, %s, %p stub.\n", iface, stream_index, debugstr_guid(attribute), value);
+ FIXME("%p, %ld, %s, %p stub.\n", iface, stream_index, debugstr_guid(attribute), value);
return E_NOTIMPL;
}
static HRESULT WINAPI media_engine_GetStreamSelection(IMFMediaEngineEx *iface, DWORD stream_index, BOOL *enabled)
{
- FIXME("%p, %d, %p stub.\n", iface, stream_index, enabled);
+ FIXME("%p, %ld, %p stub.\n", iface, stream_index, enabled);
return E_NOTIMPL;
}
static HRESULT WINAPI media_engine_SetStreamSelection(IMFMediaEngineEx *iface, DWORD stream_index, BOOL enabled)
{
- FIXME("%p, %d, %d stub.\n", iface, stream_index, enabled);
+ FIXME("%p, %ld, %d stub.\n", iface, stream_index, enabled);
return E_NOTIMPL;
}
@@ -3036,7 +3036,7 @@ static HRESULT WINAPI media_engine_factory_CreateInstance(IMFMediaEngineClassFac
struct media_engine *object;
HRESULT hr;
- TRACE("%p, %#x, %p, %p.\n", iface, flags, attributes, engine);
+ TRACE("%p, %#lx, %p, %p.\n", iface, flags, attributes, engine);
if (!attributes || !engine)
return E_POINTER;
--
2.34.1
1
0
Feb. 11, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfplay/tests/Makefile.in | 1 -
dlls/mfplay/tests/mfplay.c | 152 +++++++++++++++++-----------------
2 files changed, 76 insertions(+), 77 deletions(-)
diff --git a/dlls/mfplay/tests/Makefile.in b/dlls/mfplay/tests/Makefile.in
index 06f77c94fec..4eabb5ae0ab 100644
--- a/dlls/mfplay/tests/Makefile.in
+++ b/dlls/mfplay/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = mfplay.dll
IMPORTS = mfplay user32 uuid mfuuid
diff --git a/dlls/mfplay/tests/mfplay.c b/dlls/mfplay/tests/mfplay.c
index 727ab1e3b9a..3c2782a9412 100644
--- a/dlls/mfplay/tests/mfplay.c
+++ b/dlls/mfplay/tests/mfplay.c
@@ -37,7 +37,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);
}
@@ -88,40 +88,40 @@ static void test_create_player(void)
HRESULT hr;
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, NULL);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = MFPCreateMediaPlayer(NULL, TRUE, 0, NULL, NULL, NULL);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
player = (void *)0xdeadbeef;
hr = MFPCreateMediaPlayer(NULL, TRUE, 0, NULL, NULL, &player);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ok(!player, "Unexpected pointer %p.\n", player);
hr = MFPCreateMediaPlayer(L"doesnotexist.mp4", FALSE, 0, &callback, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFPCreateMediaPlayer(L"doesnotexist.mp4", FALSE, 0, &callback, NULL, &player);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#x.\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
hr = MFPCreateMediaPlayer(NULL, TRUE, 0, &callback, NULL, &player);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(player, &IID_IMFPMediaPlayer, TRUE);
check_interface(player, &IID_IPropertyStore, TRUE);
hr = IMFPMediaPlayer_QueryInterface(player, &IID_IPropertyStore, (void **)&propstore);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(propstore, &IID_IMFPMediaPlayer, TRUE);
hr = IPropertyStore_QueryInterface(propstore, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_QueryInterface(player, &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(unk);
IUnknown_Release(unk2);
@@ -131,10 +131,10 @@ static void test_create_player(void)
IMFPMediaPlayer_Release(player);
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, &callback, (HWND)0x1, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetVideoWindow(player, &window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(window == (HWND)0x1, "Unexpected window.\n");
IMFPMediaPlayer_Release(player);
@@ -155,89 +155,89 @@ static void test_shutdown(void)
HRESULT hr;
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetState(player, &state);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(state == MFP_MEDIAPLAYER_STATE_EMPTY, "Unexpected state %d.\n", state);
hr = IMFPMediaPlayer_Shutdown(player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Check methods in shutdown state. */
hr = IMFPMediaPlayer_Play(player);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_Pause(player);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_Stop(player);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetSupportedRates(player, TRUE, &slowest, &fastest);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetState(player, &state);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(state == MFP_MEDIAPLAYER_STATE_SHUTDOWN, "Unexpected state %d.\n", state);
hr = IMFPMediaPlayer_GetIdealVideoSize(player, &min_size, &max_size);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetVideoSourceRect(player, &rect);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetBorderColor(player, &color);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetAspectRatioMode(player, &mode);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetNativeVideoSize(player, &size, &size);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetBorderColor(player, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetAspectRatioMode(player, MFVideoARMode_None);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_UpdateVideo(player);
todo_wine
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_CreateMediaItemFromURL(player, L"url", TRUE, 0, &item);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_ClearMediaItem(player);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetMediaItem(player, &item);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetVideoWindow(player, &window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetDuration(player, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetDuration(player, &MFP_POSITIONTYPE_100NS, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetDuration(player, &MFP_POSITIONTYPE_100NS, &propvar);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, &MFP_POSITIONTYPE_100NS, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, &MFP_POSITIONTYPE_100NS, &propvar);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_Shutdown(player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player);
}
@@ -249,20 +249,20 @@ static void test_media_item(void)
HRESULT hr;
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetMediaItem(player, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Async mode, no callback was specified. */
hr = IMFPMediaPlayer_CreateMediaItemFromURL(player, L"url", FALSE, 0, &item);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_CreateMediaItemFromURL(player, L"url", FALSE, 0, NULL);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_CreateMediaItemFromURL(player, L"url", TRUE, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player);
}
@@ -282,82 +282,82 @@ static void test_video_control(void)
ok(!!window, "Failed to create output window.\n");
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, window, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* No active media item */
rect.left = rect.top = 0.0f;
rect.right = rect.bottom = 1.0f;
hr = IMFPMediaPlayer_SetVideoSourceRect(player, &rect);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetVideoSourceRect(player, NULL);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetBorderColor(player, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetAspectRatioMode(player, MFVideoARMode_None);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetVideoSourceRect(player, &rect);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetBorderColor(player, &color);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetAspectRatioMode(player, &mode);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetIdealVideoSize(player, &size, &size);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetNativeVideoSize(player, &size, &size);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_UpdateVideo(player);
todo_wine
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player);
/* No active media item, no output window.*/
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
rect.left = rect.top = 0.0f;
rect.right = rect.bottom = 1.0f;
hr = IMFPMediaPlayer_SetVideoSourceRect(player, &rect);
- ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Unexpected hr %#x.\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetVideoSourceRect(player, NULL);
- ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Unexpected hr %#x.\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetBorderColor(player, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_SetAspectRatioMode(player, MFVideoARMode_None);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetVideoSourceRect(player, &rect);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetBorderColor(player, &color);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetAspectRatioMode(player, &mode);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetIdealVideoSize(player, &size, &size);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetNativeVideoSize(player, &size, &size);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_UpdateVideo(player);
todo_wine
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player);
@@ -371,32 +371,32 @@ static void test_duration(void)
HRESULT hr;
hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, &player);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* No media item. */
hr = IMFPMediaPlayer_GetDuration(player, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetDuration(player, &MFP_POSITIONTYPE_100NS, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetDuration(player, &IID_IUnknown, &propvar);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetDuration(player, &MFP_POSITIONTYPE_100NS, &propvar);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, &MFP_POSITIONTYPE_100NS, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, &IID_IUnknown, &propvar);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_GetPosition(player, &MFP_POSITIONTYPE_100NS, &propvar);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player);
}
--
2.34.1
1
0
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfplay/Makefile.in | 1 -
dlls/mfplay/player.c | 44 ++++++++++++++++++++---------------------
2 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/dlls/mfplay/Makefile.in b/dlls/mfplay/Makefile.in
index 509208234c0..4d465fbec39 100644
--- a/dlls/mfplay/Makefile.in
+++ b/dlls/mfplay/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = mfplay.dll
IMPORTLIB = mfplay
IMPORTS = mfplat mf ole32 user32 uuid mfuuid strmiids
diff --git a/dlls/mfplay/player.c b/dlls/mfplay/player.c
index 01438060dbd..7f9188e5619 100644
--- a/dlls/mfplay/player.c
+++ b/dlls/mfplay/player.c
@@ -175,7 +175,7 @@ static ULONG WINAPI media_event_AddRef(IUnknown *iface)
struct media_event *event = impl_event_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&event->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -185,7 +185,7 @@ static ULONG WINAPI media_event_Release(IUnknown *iface)
struct media_event *event = impl_event_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&event->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -330,7 +330,7 @@ static ULONG WINAPI media_item_AddRef(IMFPMediaItem *iface)
struct media_item *item = impl_from_IMFPMediaItem(iface);
ULONG refcount = InterlockedIncrement(&item->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -340,7 +340,7 @@ static ULONG WINAPI media_item_Release(IMFPMediaItem *iface)
struct media_item *item = impl_from_IMFPMediaItem(iface);
ULONG refcount = InterlockedDecrement(&item->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -419,7 +419,7 @@ static HRESULT WINAPI media_item_SetUserData(IMFPMediaItem *iface, DWORD_PTR use
{
struct media_item *item = impl_from_IMFPMediaItem(iface);
- TRACE("%p, %lx.\n", iface, user_data);
+ TRACE("%p, %Ix.\n", iface, user_data);
item->user_data = user_data;
@@ -607,7 +607,7 @@ static HRESULT WINAPI media_item_GetStreamSelection(IMFPMediaItem *iface, DWORD
IMFStreamDescriptor *sd;
HRESULT hr;
- TRACE("%p, %u, %p.\n", iface, index, selected);
+ TRACE("%p, %lu, %p.\n", iface, index, selected);
if (SUCCEEDED(hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(item->pd, index, selected, &sd)))
IMFStreamDescriptor_Release(sd);
@@ -619,7 +619,7 @@ static HRESULT WINAPI media_item_SetStreamSelection(IMFPMediaItem *iface, DWORD
{
struct media_item *item = impl_from_IMFPMediaItem(iface);
- TRACE("%p, %u, %d.\n", iface, index, select);
+ TRACE("%p, %lu, %d.\n", iface, index, select);
return select ? IMFPresentationDescriptor_SelectStream(item->pd, index) :
IMFPresentationDescriptor_DeselectStream(item->pd, index);
@@ -633,7 +633,7 @@ static HRESULT WINAPI media_item_GetStreamAttribute(IMFPMediaItem *iface, DWORD
BOOL selected;
HRESULT hr;
- TRACE("%p, %u, %s, %p.\n", iface, index, debugstr_guid(key), value);
+ TRACE("%p, %lu, %s, %p.\n", iface, index, debugstr_guid(key), value);
if (SUCCEEDED(hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(item->pd, index, &selected, &sd)))
{
@@ -681,7 +681,7 @@ static HRESULT WINAPI media_item_SetStreamSink(IMFPMediaItem *iface, DWORD index
BOOL selected;
HRESULT hr;
- TRACE("%p, %u, %p.\n", iface, index, sink);
+ TRACE("%p, %lu, %p.\n", iface, index, sink);
if (FAILED(hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(item->pd, index, &selected, &sd)))
return hr;
@@ -778,7 +778,7 @@ static HRESULT media_item_set_source(struct media_item *item, IUnknown *object)
if (FAILED(hr = IMFMediaSource_CreatePresentationDescriptor(source, &pd)))
{
- WARN("Failed to get presentation descriptor, hr %#x.\n", hr);
+ WARN("Failed to get presentation descriptor, hr %#lx.\n", hr);
IMFMediaSource_Release(source);
return hr;
}
@@ -834,7 +834,7 @@ static ULONG WINAPI media_player_AddRef(IMFPMediaPlayer *iface)
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
ULONG refcount = InterlockedIncrement(&player->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -844,7 +844,7 @@ static ULONG WINAPI media_player_Release(IMFPMediaPlayer *iface)
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
ULONG refcount = InterlockedDecrement(&player->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1082,7 +1082,7 @@ static HRESULT WINAPI media_player_CreateMediaItemFromURL(IMFPMediaPlayer *iface
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
HRESULT hr;
- TRACE("%p, %s, %d, %lx, %p.\n", iface, debugstr_w(url), sync, user_data, item);
+ TRACE("%p, %s, %d, %Ix, %p.\n", iface, debugstr_w(url), sync, user_data, item);
EnterCriticalSection(&player->cs);
if (player->state == MFP_MEDIAPLAYER_STATE_SHUTDOWN)
@@ -1174,7 +1174,7 @@ static HRESULT WINAPI media_player_CreateMediaItemFromObject(IMFPMediaPlayer *if
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
HRESULT hr;
- TRACE("%p, %p, %d, %lx, %p.\n", iface, object, sync, user_data, item);
+ TRACE("%p, %p, %d, %Ix, %p.\n", iface, object, sync, user_data, item);
EnterCriticalSection(&player->cs);
if (player->state == MFP_MEDIAPLAYER_STATE_SHUTDOWN)
@@ -1249,12 +1249,12 @@ static HRESULT media_item_create_topology(struct media_player *player, struct me
else if (IsEqualGUID(&major, &MFMediaType_Audio))
{
if (FAILED(hr = MFCreateAudioRendererActivate((IMFActivate **)&sink)))
- WARN("Failed to create SAR activation object, hr %#x.\n", hr);
+ WARN("Failed to create SAR activation object, hr %#lx.\n", hr);
}
else if (IsEqualGUID(&major, &MFMediaType_Video) && player->output_window && !video_added)
{
if (FAILED(hr = MFCreateVideoRendererActivate(player->output_window, (IMFActivate **)&sink)))
- WARN("Failed to create EVR activation object, hr %#x.\n", hr);
+ WARN("Failed to create EVR activation object, hr %#lx.\n", hr);
video_added = SUCCEEDED(hr);
}
@@ -1482,7 +1482,7 @@ static HRESULT WINAPI media_player_SetAspectRatioMode(IMFPMediaPlayer *iface, DW
IMFVideoDisplayControl *display_control;
HRESULT hr;
- TRACE("%p, %u.\n", iface, mode);
+ TRACE("%p, %lu.\n", iface, mode);
if (SUCCEEDED(hr = media_player_get_display_control(player, &display_control)))
{
@@ -1535,7 +1535,7 @@ static HRESULT WINAPI media_player_SetBorderColor(IMFPMediaPlayer *iface, COLORR
IMFVideoDisplayControl *display_control;
HRESULT hr;
- TRACE("%p, %#x.\n", iface, color);
+ TRACE("%p, %#lx.\n", iface, color);
if (SUCCEEDED(hr = media_player_get_display_control(player, &display_control)))
{
@@ -1678,7 +1678,7 @@ static HRESULT WINAPI media_player_propstore_GetAt(IPropertyStore *iface, DWORD
{
struct media_player *player = impl_from_IPropertyStore(iface);
- TRACE("%p, %u, %p.\n", iface, prop, key);
+ TRACE("%p, %lu, %p.\n", iface, prop, key);
return IPropertyStore_GetAt(player->propstore, prop, key);
}
@@ -1784,7 +1784,7 @@ static HRESULT WINAPI media_player_resolver_callback_Invoke(IMFAsyncCallback *if
}
if (FAILED(hr))
- WARN("Failed to set media source, hr %#x.\n", hr);
+ WARN("Failed to set media source, hr %#lx.\n", hr);
if (FAILED(media_event_create(player, MFP_EVENT_TYPE_MEDIAITEM_CREATED, hr,
&item->IMFPMediaItem_iface, &event)))
@@ -2111,7 +2111,7 @@ HRESULT WINAPI MFPCreateMediaPlayer(const WCHAR *url, BOOL start_playback, MFP_C
{
if (FAILED(hr = media_player_create_item_from_url(object, url, TRUE, 0, &item)))
{
- WARN("Failed to create media item, hr %#x.\n", hr);
+ WARN("Failed to create media item, hr %#lx.\n", hr);
goto failed;
}
@@ -2119,7 +2119,7 @@ HRESULT WINAPI MFPCreateMediaPlayer(const WCHAR *url, BOOL start_playback, MFP_C
IMFPMediaItem_Release(item);
if (FAILED(hr))
{
- WARN("Failed to set media item, hr %#x.\n", hr);
+ WARN("Failed to set media item, hr %#lx.\n", hr);
goto failed;
}
--
2.34.1
1
0
Feb. 11, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/combase/tests/Makefile.in | 1 -
dlls/combase/tests/roapi.c | 14 +++++++-------
dlls/combase/tests/string.c | 8 ++++----
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/combase/tests/Makefile.in b/dlls/combase/tests/Makefile.in
index b98b0e37c6a..1c3d77725b3 100644
--- a/dlls/combase/tests/Makefile.in
+++ b/dlls/combase/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = combase.dll
IMPORTS = combase
diff --git a/dlls/combase/tests/roapi.c b/dlls/combase/tests/roapi.c
index 1efcc801dcb..b1ac15a08cb 100644
--- a/dlls/combase/tests/roapi.c
+++ b/dlls/combase/tests/roapi.c
@@ -37,27 +37,27 @@ static void test_ActivationFactories(void)
hr = WindowsCreateString(L"Windows.Data.Xml.Dom.XmlDocument",
ARRAY_SIZE(L"Windows.Data.Xml.Dom.XmlDocument") - 1, &str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = WindowsCreateString(L"Does.Not.Exist", ARRAY_SIZE(L"Does.Not.Exist") - 1, &str2);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = RoGetActivationFactory(str2, &IID_IActivationFactory, (void **)&factory);
- ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- todo_wine ok(hr == S_OK, "got %08x\n", hr);
+ todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if(factory)
IActivationFactory_Release(factory);
hr = RoActivateInstance(str2, &inspect);
- ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = RoActivateInstance(str, &inspect);
- todo_wine ok(hr == S_OK, "got %08x\n", hr);
+ todo_wine ok(hr == S_OK, "UNexpected hr %#lx.\n", hr);
if(inspect)
IInspectable_Release(inspect);
diff --git a/dlls/combase/tests/string.c b/dlls/combase/tests/string.c
index 232d37304d6..ceb8ffa6e09 100644
--- a/dlls/combase/tests/string.c
+++ b/dlls/combase/tests/string.c
@@ -514,7 +514,7 @@ static void test_hstring_struct(void)
ok(prv->header.flags == 0, "Expected 0 in flags field, got %#x.\n", prv->header.flags);
ok(prv->header.length == 6, "Expected 6 in length field, got %u.\n", prv->header.length);
ok(prv->header.str == prv->buffer, "Expected str to point at buffer, instead pointing at %p.\n", prv->header.str);
- ok(prv->refcount == 1, "Expected 1 in refcount, got %u.\n", prv->refcount);
+ ok(prv->refcount == 1, "Expected 1 in refcount, got %lu.\n", prv->refcount);
ok(wcscmp(input_string, prv->buffer) == 0, "Expected strings to match.\n");
ok(prv->buffer[prv->header.length] == '\0', "Expected buffer to be null terminated.\n");
@@ -522,13 +522,13 @@ static void test_hstring_struct(void)
prv2 = CONTAINING_RECORD(str2, struct hstring_private, header);
- ok(prv->refcount == 2, "Expected 2 in refcount, got %u.\n", prv->refcount);
- ok(prv2->refcount == 2, "Expected 2 in refcount, got %u.\n", prv2->refcount);
+ ok(prv->refcount == 2, "Expected 2 in refcount, got %lu.\n", prv->refcount);
+ ok(prv2->refcount == 2, "Expected 2 in refcount, got %lu.\n", prv2->refcount);
ok(wcscmp(input_string, prv2->buffer) == 0, "Expected strings to match.\n");
ok(WindowsDeleteString(str) == S_OK, "Failed to delete string.\n");
- ok(prv->refcount == 1, "Expected 1 in refcount, got %u.\n", prv->refcount);
+ ok(prv->refcount == 1, "Expected 1 in refcount, got %lu.\n", prv->refcount);
ok(WindowsDeleteString(str) == S_OK, "Failed to delete string.\n");
--
2.34.1
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shcore/Makefile.in | 1 -
dlls/shcore/main.c | 96 ++++++++++++++++++++---------------------
2 files changed, 46 insertions(+), 51 deletions(-)
diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
index 084ff0d87c7..7c4d161a558 100644
--- a/dlls/shcore/Makefile.in
+++ b/dlls/shcore/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = shcore.dll
IMPORTLIB = shcore
IMPORTS = user32 gdi32 ole32 advapi32
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
index 633628b4c72..6cc18ad1473 100644
--- a/dlls/shcore/main.c
+++ b/dlls/shcore/main.c
@@ -41,7 +41,7 @@ static IUnknown *process_ref;
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
- TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+ TRACE("%p, %lu, %p.\n", instance, reason, reserved);
switch (reason)
{
@@ -97,7 +97,7 @@ HRESULT WINAPI _IStream_Read(IStream *stream, void *dest, ULONG size)
ULONG read;
HRESULT hr;
- TRACE("(%p, %p, %u)\n", stream, dest, size);
+ TRACE("%p, %p, %lu.\n", stream, dest, size);
hr = IStream_Read(stream, dest, size, &read);
if (SUCCEEDED(hr) && read != size)
@@ -135,7 +135,7 @@ HRESULT WINAPI _IStream_Write(IStream *stream, const void *src, ULONG size)
ULONG written;
HRESULT hr;
- TRACE("(%p, %p, %u)\n", stream, src, size);
+ TRACE("%p, %p, %lu.\n", stream, src, size);
hr = IStream_Write(stream, src, size, &written);
if (SUCCEEDED(hr) && written != size)
@@ -226,22 +226,22 @@ HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
return E_FAIL;
hr = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (void **)&objwithsite);
- TRACE("ObjectWithSite %p, hr %#x.\n", objwithsite, hr);
+ TRACE("ObjectWithSite %p, hr %#lx.\n", objwithsite, hr);
if (SUCCEEDED(hr))
{
hr = IObjectWithSite_SetSite(objwithsite, site);
- TRACE("SetSite() hr %#x.\n", hr);
+ TRACE("SetSite() hr %#lx.\n", hr);
IObjectWithSite_Release(objwithsite);
}
else
{
hr = IUnknown_QueryInterface(obj, &IID_IInternetSecurityManager, (void **)&sec_manager);
- TRACE("InternetSecurityManager %p, hr %#x.\n", sec_manager, hr);
+ TRACE("InternetSecurityManager %p, hr %#lx.\n", sec_manager, hr);
if (FAILED(hr))
return hr;
hr = IInternetSecurityManager_SetSecuritySite(sec_manager, (IInternetSecurityMgrSite *)site);
- TRACE("SetSecuritySite() hr %#x.\n", hr);
+ TRACE("SetSecuritySite() hr %#lx.\n", hr);
IInternetSecurityManager_Release(sec_manager);
}
@@ -573,7 +573,7 @@ static ULONG WINAPI shstream_AddRef(IStream *iface)
struct shstream *stream = impl_from_IStream(iface);
ULONG refcount = InterlockedIncrement(&stream->refcount);
- TRACE("(%p)->(%u)\n", stream, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -583,7 +583,7 @@ static ULONG WINAPI memstream_Release(IStream *iface)
struct shstream *stream = impl_from_IStream(iface);
ULONG refcount = InterlockedDecrement(&stream->refcount);
- TRACE("(%p)->(%u)\n", stream, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -599,7 +599,7 @@ static HRESULT WINAPI memstream_Read(IStream *iface, void *buff, ULONG buff_size
struct shstream *stream = impl_from_IStream(iface);
DWORD length;
- TRACE("(%p)->(%p, %u, %p)\n", stream, buff, buff_size, read_len);
+ TRACE("%p, %p, %lu, %p.\n", iface, buff, buff_size, read_len);
if (stream->u.mem.position >= stream->u.mem.length)
{
@@ -626,7 +626,7 @@ static HRESULT WINAPI memstream_Write(IStream *iface, const void *buff, ULONG bu
struct shstream *stream = impl_from_IStream(iface);
DWORD length = stream->u.mem.position + buff_size;
- TRACE("(%p)->(%p, %u, %p)\n", stream, buff, buff_size, written);
+ TRACE("%p, %p, %lu, %p.\n", iface, buff, buff_size, written);
if (length < stream->u.mem.position) /* overflow */
return STG_E_INSUFFICIENTMEMORY;
@@ -654,7 +654,7 @@ static HRESULT WINAPI memstream_Seek(IStream *iface, LARGE_INTEGER move, DWORD o
struct shstream *stream = impl_from_IStream(iface);
LARGE_INTEGER tmp;
- TRACE("(%p)->(%s, %d, %p)\n", stream, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
+ TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
if (origin == STREAM_SEEK_SET)
tmp = move;
@@ -748,9 +748,7 @@ static HRESULT WINAPI shstream_CopyTo(IStream *iface, IStream *dest, ULARGE_INTE
static HRESULT WINAPI shstream_Commit(IStream *iface, DWORD flags)
{
- struct shstream *stream = impl_from_IStream(iface);
-
- TRACE("(%p, %#x)\n", stream, flags);
+ TRACE("%p, %#lx.\n", iface, flags);
/* Commit is not supported by this stream */
return E_NOTIMPL;
@@ -790,7 +788,7 @@ static HRESULT WINAPI memstream_Stat(IStream *iface, STATSTG *statstg, DWORD fla
{
struct shstream *stream = impl_from_IStream(iface);
- TRACE("(%p, %p, %#x)\n", stream, statstg, flags);
+ TRACE("%p, %p, %#lx.\n", iface, statstg, flags);
memset(statstg, 0, sizeof(*statstg));
statstg->type = STGTY_STREAM;
@@ -884,7 +882,7 @@ static ULONG WINAPI filestream_Release(IStream *iface)
struct shstream *stream = impl_from_IStream(iface);
ULONG refcount = InterlockedDecrement(&stream->refcount);
- TRACE("(%p)->(%u)\n", stream, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -901,11 +899,11 @@ static HRESULT WINAPI filestream_Read(IStream *iface, void *buff, ULONG size, UL
struct shstream *stream = impl_from_IStream(iface);
DWORD read = 0;
- TRACE("(%p, %p, %u, %p)\n", stream, buff, size, read_len);
+ TRACE("%p, %p, %lu, %p.\n", iface, buff, size, read_len);
if (!ReadFile(stream->u.file.handle, buff, size, &read, NULL))
{
- WARN("error %d reading file\n", GetLastError());
+ WARN("error %ld reading file\n", GetLastError());
return S_FALSE;
}
@@ -920,7 +918,7 @@ static HRESULT WINAPI filestream_Write(IStream *iface, const void *buff, ULONG s
struct shstream *stream = impl_from_IStream(iface);
DWORD written_len = 0;
- TRACE("(%p, %p, %u, %p)\n", stream, buff, size, written);
+ TRACE("%p, %p, %lu, %p.\n", iface, buff, size, written);
switch (stream->u.file.mode & 0xf)
{
@@ -945,7 +943,7 @@ static HRESULT WINAPI filestream_Seek(IStream *iface, LARGE_INTEGER move, DWORD
struct shstream *stream = impl_from_IStream(iface);
DWORD position;
- TRACE("(%p, %s, %d, %p)\n", stream, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
+ TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, new_pos);
position = SetFilePointer(stream->u.file.handle, move.u.LowPart, NULL, origin);
if (position == INVALID_SET_FILE_POINTER)
@@ -1031,9 +1029,7 @@ static HRESULT WINAPI filestream_CopyTo(IStream *iface, IStream *dest, ULARGE_IN
static HRESULT WINAPI filestream_Commit(IStream *iface, DWORD flags)
{
- struct shstream *stream = impl_from_IStream(iface);
-
- TRACE("(%p, %#x)\n", stream, flags);
+ TRACE("%p, %#lx.\n", iface, flags);
return S_OK;
}
@@ -1043,7 +1039,7 @@ static HRESULT WINAPI filestream_Stat(IStream *iface, STATSTG *statstg, DWORD fl
struct shstream *stream = impl_from_IStream(iface);
BY_HANDLE_FILE_INFORMATION fi;
- TRACE("(%p, %p, %#x)\n", stream, statstg, flags);
+ TRACE("%p, %p, %#lx.\n", iface, statstg, flags);
if (!statstg)
return STG_E_INVALIDPOINTER;
@@ -1102,7 +1098,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(const WCHAR *path, DWORD mode, DWORD attri
struct shstream *stream;
HANDLE hFile;
- TRACE("(%s, %d, 0x%08X, %d, %p, %p)\n", debugstr_w(path), mode, attributes,
+ TRACE("%s, %ld, %#lx, %d, %p, %p)\n", debugstr_w(path), mode, attributes,
create, template, ret);
if (!path || !ret || template)
@@ -1180,7 +1176,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(const WCHAR *path, DWORD mode, DWORD attri
*/
HRESULT WINAPI SHCreateStreamOnFileW(const WCHAR *path, DWORD mode, IStream **stream)
{
- TRACE("(%s, %#x, %p)\n", debugstr_w(path), mode, stream);
+ TRACE("%s, %#lx, %p.\n", debugstr_w(path), mode, stream);
if (!path || !stream)
return E_INVALIDARG;
@@ -1200,7 +1196,7 @@ HRESULT WINAPI SHCreateStreamOnFileA(const char *path, DWORD mode, IStream **str
HRESULT hr;
DWORD len;
- TRACE("(%s, %#x, %p)\n", debugstr_a(path), mode, stream);
+ TRACE("%s, %#lx, %p.\n", debugstr_a(path), mode, stream);
if (!path)
return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND);
@@ -1222,7 +1218,7 @@ static ULONG WINAPI regstream_Release(IStream *iface)
struct shstream *stream = impl_from_IStream(iface);
ULONG refcount = InterlockedDecrement(&stream->refcount);
- TRACE("(%p)->(%u)\n", stream, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1272,7 +1268,7 @@ IStream * WINAPI SHOpenRegStream2W(HKEY hKey, const WCHAR *subkey, const WCHAR *
DWORD length = 0;
LONG ret;
- TRACE("(%p, %s, %s, %#x)\n", hKey, debugstr_w(subkey), debugstr_w(value), mode);
+ TRACE("%p, %s, %s, %#lx.\n", hKey, debugstr_w(subkey), debugstr_w(value), mode);
if (mode == STGM_READ)
ret = RegOpenKeyExW(hKey, subkey, 0, KEY_READ, &hStrKey);
@@ -1319,7 +1315,7 @@ IStream * WINAPI SHOpenRegStream2A(HKEY hKey, const char *subkey, const char *va
WCHAR *subkeyW = NULL, *valueW = NULL;
IStream *stream;
- TRACE("(%p, %s, %s, %#x)\n", hKey, debugstr_a(subkey), debugstr_a(value), mode);
+ TRACE("%p, %s, %s, %#lx.\n", hKey, debugstr_a(subkey), debugstr_a(value), mode);
if (subkey && FAILED(SHStrDupA(subkey, &subkeyW)))
return NULL;
@@ -1343,7 +1339,7 @@ IStream * WINAPI SHOpenRegStreamA(HKEY hkey, const char *subkey, const char *val
WCHAR *subkeyW = NULL, *valueW = NULL;
IStream *stream;
- TRACE("(%p, %s, %s, %#x)\n", hkey, debugstr_a(subkey), debugstr_a(value), mode);
+ TRACE("%p, %s, %s, %#lx.\n", hkey, debugstr_a(subkey), debugstr_a(value), mode);
if (subkey && FAILED(SHStrDupA(subkey, &subkeyW)))
return NULL;
@@ -1406,7 +1402,7 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, const WCHAR *subkey, const WCHAR *v
{
IStream *stream;
- TRACE("(%p, %s, %s, %#x)\n", hkey, debugstr_w(subkey), debugstr_w(value), mode);
+ TRACE("%p, %s, %s, %#lx.\n", hkey, debugstr_w(subkey), debugstr_w(value), mode);
stream = SHOpenRegStream2W(hkey, subkey, value, mode);
return stream ? stream : &dummyregstream.IStream_iface;
}
@@ -1448,7 +1444,7 @@ static ULONG WINAPI threadref_AddRef(IUnknown *iface)
struct threadref *threadref = threadref_impl_from_IUnknown(iface);
LONG refcount = InterlockedIncrement(threadref->refcount);
- TRACE("(%p, %d)\n", threadref, refcount);
+ TRACE("%p, refcount %ld.\n", threadref, refcount);
return refcount;
}
@@ -1458,7 +1454,7 @@ static ULONG WINAPI threadref_Release(IUnknown *iface)
struct threadref *threadref = threadref_impl_from_IUnknown(iface);
LONG refcount = InterlockedDecrement(threadref->refcount);
- TRACE("(%p, %d)\n", threadref, refcount);
+ TRACE("%p, refcount %ld.\n", threadref, refcount);
if (!refcount)
heap_free(threadref);
@@ -1631,7 +1627,7 @@ BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE thread_proc, void *data, DWORD
struct thread_data thread_data;
BOOL called = FALSE;
- TRACE("(%p, %p, %#x, %p)\n", thread_proc, data, flags, callback);
+ TRACE("%p, %p, %#lx, %p.\n", thread_proc, data, flags, callback);
thread_data.thread_proc = thread_proc;
thread_data.callback = callback;
@@ -1953,7 +1949,7 @@ DWORD WINAPI SHCopyKeyA(HKEY hkey_src, const char *subkey, HKEY hkey_dst, DWORD
WCHAR *subkeyW = NULL;
DWORD ret;
- TRACE("(%p, %s, %p, %d)\n", hkey_src, debugstr_a(subkey), hkey_dst, reserved);
+ TRACE("%p, %s, %p, %ld.\n", hkey_src, debugstr_a(subkey), hkey_dst, reserved);
if (subkey && FAILED(SHStrDupA(subkey, &subkeyW)))
return 0;
@@ -1974,7 +1970,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hkey_src, const WCHAR *subkey, HKEY hkey_dst, DWORD
DWORD max_data_len = 0, i;
DWORD ret = 0;
- TRACE("(%p, %s, %p, %d)\n", hkey_src, debugstr_w(subkey), hkey_dst, reserved);
+ TRACE("%p, %s, %p, %ld.\n", hkey_src, debugstr_w(subkey), hkey_dst, reserved);
if (!hkey_dst || !hkey_src)
return ERROR_INVALID_PARAMETER;
@@ -2059,7 +2055,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hkey_src, const WCHAR *subkey, HKEY hkey_dst, DWORD
*/
LONG WINAPI SHEnumKeyExA(HKEY hkey, DWORD index, char *subkey, DWORD *length)
{
- TRACE("(%p, %d, %s, %p)\n", hkey, index, debugstr_a(subkey), length);
+ TRACE("%p, %ld, %s, %p.\n", hkey, index, debugstr_a(subkey), length);
return RegEnumKeyExA(hkey, index, subkey, length, NULL, NULL, NULL, NULL);
}
@@ -2069,7 +2065,7 @@ LONG WINAPI SHEnumKeyExA(HKEY hkey, DWORD index, char *subkey, DWORD *length)
*/
LONG WINAPI SHEnumKeyExW(HKEY hkey, DWORD index, WCHAR *subkey, DWORD *length)
{
- TRACE("(%p, %d, %s, %p)\n", hkey, index, debugstr_w(subkey), length);
+ TRACE("%p, %ld, %s, %p.\n", hkey, index, debugstr_w(subkey), length);
return RegEnumKeyExW(hkey, index, subkey, length, NULL, NULL, NULL, NULL);
}
@@ -2080,7 +2076,7 @@ LONG WINAPI SHEnumKeyExW(HKEY hkey, DWORD index, WCHAR *subkey, DWORD *length)
LONG WINAPI SHEnumValueA(HKEY hkey, DWORD index, char *value, DWORD *length, DWORD *type,
void *data, DWORD *data_len)
{
- TRACE("(%p, %d, %s, %p, %p, %p, %p)\n", hkey, index, debugstr_a(value), length, type, data, data_len);
+ TRACE("%p, %ld, %s, %p, %p, %p, %p.\n", hkey, index, debugstr_a(value), length, type, data, data_len);
return RegEnumValueA(hkey, index, value, length, NULL, type, data, data_len);
}
@@ -2091,7 +2087,7 @@ LONG WINAPI SHEnumValueA(HKEY hkey, DWORD index, char *value, DWORD *length, DWO
LONG WINAPI SHEnumValueW(HKEY hkey, DWORD index, WCHAR *value, DWORD *length, DWORD *type,
void *data, DWORD *data_len)
{
- TRACE("(%p, %d, %s, %p, %p, %p, %p)\n", hkey, index, debugstr_w(value), length, type, data, data_len);
+ TRACE("%p, %ld, %s, %p, %p, %p, %p.\n", hkey, index, debugstr_w(value), length, type, data, data_len);
return RegEnumValueW(hkey, index, value, length, NULL, type, data, data_len);
}
@@ -2270,7 +2266,7 @@ DWORD WINAPI SHRegGetPathA(HKEY hkey, const char *subkey, const char *value, cha
{
DWORD length = MAX_PATH;
- TRACE("(%p, %s, %s, %p, %#x)\n", hkey, debugstr_a(subkey), debugstr_a(value), path, flags);
+ TRACE("%p, %s, %s, %p, %#lx.\n", hkey, debugstr_a(subkey), debugstr_a(value), path, flags);
return SHGetValueA(hkey, subkey, value, 0, path, &length);
}
@@ -2282,7 +2278,7 @@ DWORD WINAPI SHRegGetPathW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, W
{
DWORD length = MAX_PATH;
- TRACE("(%p, %s, %s, %p, %d)\n", hkey, debugstr_w(subkey), debugstr_w(value), path, flags);
+ TRACE("%p, %s, %s, %p, %#lx.\n", hkey, debugstr_w(subkey), debugstr_w(value), path, flags);
return SHGetValueW(hkey, subkey, value, 0, path, &length);
}
@@ -2296,7 +2292,7 @@ DWORD WINAPI SHSetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWO
DWORD ret = ERROR_SUCCESS, dummy;
HKEY hsubkey;
- TRACE("(%p, %s, %s, %d, %p, %d)\n", hkey, debugstr_w(subkey), debugstr_w(value),
+ TRACE("%p, %s, %s, %ld, %p, %ld.\n", hkey, debugstr_w(subkey), debugstr_w(value),
type, data, data_len);
if (subkey && *subkey)
@@ -2323,7 +2319,7 @@ DWORD WINAPI SHSetValueA(HKEY hkey, const char *subkey, const char *value,
DWORD ret = ERROR_SUCCESS, dummy;
HKEY hsubkey;
- TRACE("(%p, %s, %s, %d, %p, %d)\n", hkey, debugstr_a(subkey), debugstr_a(value),
+ TRACE("%p, %s, %s, %ld, %p, %ld.\n", hkey, debugstr_a(subkey), debugstr_a(value),
type, data, data_len);
if (subkey && *subkey)
@@ -2346,7 +2342,7 @@ DWORD WINAPI SHSetValueA(HKEY hkey, const char *subkey, const char *value,
*/
DWORD WINAPI SHRegSetPathA(HKEY hkey, const char *subkey, const char *value, const char *path, DWORD flags)
{
- FIXME("(%p, %s, %s, %s, %#x) - semi-stub\n", hkey, debugstr_a(subkey),
+ FIXME("%p, %s, %s, %s, %#lx - semi-stub\n", hkey, debugstr_a(subkey),
debugstr_a(value), debugstr_a(path), flags);
/* FIXME: PathUnExpandEnvStringsA() */
@@ -2359,7 +2355,7 @@ DWORD WINAPI SHRegSetPathA(HKEY hkey, const char *subkey, const char *value, con
*/
DWORD WINAPI SHRegSetPathW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, const WCHAR *path, DWORD flags)
{
- FIXME("(%p, %s, %s, %s, %#x) - semi-stub\n", hkey, debugstr_w(subkey),
+ FIXME("%p, %s, %s, %s, %#lx semi-stub\n", hkey, debugstr_w(subkey),
debugstr_w(value), debugstr_w(path), flags);
/* FIXME: PathUnExpandEnvStringsW(); */
@@ -2404,7 +2400,7 @@ BOOL WINAPI IsOS(DWORD feature)
platform = osvi.dwPlatformId;
#define ISOS_RETURN(x) \
- TRACE("(0x%x) ret=%d\n",feature,(x)); \
+ TRACE("(%#lx) ret %d\n",feature,(x)); \
return (x)
switch(feature) {
@@ -2502,7 +2498,7 @@ BOOL WINAPI IsOS(DWORD feature)
#undef ISOS_RETURN
- WARN("(0x%x) unknown parameter\n", feature);
+ WARN("(%#lx) unknown parameter\n", feature);
return FALSE;
}
--
2.34.1
1
0
Feb. 11, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/scrrun/tests/Makefile.in | 1 -
dlls/scrrun/tests/dictionary.c | 320 +++++++-------
dlls/scrrun/tests/filesystem.c | 750 +++++++++++++++++----------------
3 files changed, 529 insertions(+), 542 deletions(-)
diff --git a/dlls/scrrun/tests/Makefile.in b/dlls/scrrun/tests/Makefile.in
index 88f08303eee..e9eccb686d2 100644
--- a/dlls/scrrun/tests/Makefile.in
+++ b/dlls/scrrun/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = scrrun.dll
IMPORTS = ole32 shlwapi uuid oleaut32 user32
diff --git a/dlls/scrrun/tests/dictionary.c b/dlls/scrrun/tests/dictionary.c
index d20456a5096..16a195955ac 100644
--- a/dlls/scrrun/tests/dictionary.c
+++ b/dlls/scrrun/tests/dictionary.c
@@ -40,13 +40,13 @@ static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
HRESULT hr;
hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void **)&classinfo);
- ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#lx.\n", hr);
hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
- ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &attr);
- ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#lx.\n", hr);
ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo %s, expected %s\n", wine_dbgstr_guid(&attr->guid),
wine_dbgstr_guid(guid));
@@ -74,19 +74,19 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDispatch, (void**)&disp);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&key);
VariantInit(&value);
hr = IDispatch_QueryInterface(disp, &IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IObjectWithSite, (void**)&site);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(disp, &CLSID_Dictionary);
@@ -95,12 +95,12 @@ static void test_interfaces(void)
V_VT(&value) = VT_BSTR;
V_BSTR(&value) = SysAllocString(L"a");
hr = IDictionary_Add(dict, &key, &value);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
exists = VARIANT_FALSE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_TRUE, "Expected TRUE but got FALSE.\n");
VariantClear(&key);
@@ -108,13 +108,13 @@ static void test_interfaces(void)
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(L"b");
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_FALSE, "Expected FALSE but got TRUE.\n");
VariantClear(&key);
hr = IDictionary_get_Count(dict, &count);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
- ok(count == 1, "got %d, expected 1\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 1, "Unexpected value %lu.\n", count);
IDictionary_Release(dict);
IDispatch_Release(disp);
@@ -129,29 +129,29 @@ static void test_comparemode(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) /* crashes on native */
hr = IDictionary_get_CompareMode(dict, NULL);
method = 10;
hr = IDictionary_get_CompareMode(dict, &method);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(method == BinaryCompare, "got %d\n", method);
/* invalid mode value is not checked */
hr = IDictionary_put_CompareMode(dict, 10);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_get_CompareMode(dict, &method);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(method == 10, "got %d\n", method);
hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_get_CompareMode(dict, &method);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(method == DatabaseCompare, "got %d\n", method);
/* try to change mode of a non-empty dict */
@@ -159,10 +159,10 @@ static void test_comparemode(void)
V_I2(&key) = 0;
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_put_CompareMode(dict, BinaryCompare);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "Unexpected hr %#lx.\n", hr);
IDictionary_Release(dict);
}
@@ -356,58 +356,56 @@ static void test_hash_value(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = NULL;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got %d\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
- for (i = 0; i < ARRAY_SIZE(str_hash_tests); i++) {
+ for (i = 0; i < ARRAY_SIZE(str_hash_tests); ++i)
+ {
expected = get_str_hash(str_hash_tests[i], BinaryCompare);
hr = IDictionary_put_CompareMode(dict, BinaryCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(str_hash_tests[i]);
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: binary mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: db mode: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
VariantClear(&key);
expected = get_str_hash(str_hash_tests[i], TextCompare);
hr = IDictionary_put_CompareMode(dict, TextCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(str_hash_tests[i]);
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: text mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: db mode: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
VariantClear(&key);
expected = get_str_hash(str_hash_tests[i], DatabaseCompare);
hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(str_hash_tests[i]);
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: db mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: db mode: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
VariantClear(&key);
}
@@ -415,49 +413,49 @@ static void test_hash_value(void)
V_INT(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UINT;
V_UINT(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_I1;
V_I1(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0xa1), "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0xa1), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_I8;
V_I8(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UI2;
V_UI2(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UI4;
V_UI4(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
for (i = 0; i < ARRAY_SIZE(int_hash_tests); i++) {
SHORT i2;
@@ -470,59 +468,53 @@ static void test_hash_value(void)
V_I2(&key) = int_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
i2 = int_hash_tests[i];
V_VT(&key) = VT_I2|VT_BYREF;
V_I2REF(&key) = &i2;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_I4;
V_I4(&key) = int_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
i4 = int_hash_tests[i];
V_VT(&key) = VT_I4|VT_BYREF;
V_I4REF(&key) = &i4;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
expected = get_num_hash((FLOAT)(BYTE)int_hash_tests[i]);
V_VT(&key) = VT_UI1;
V_UI1(&key) = int_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
ui1 = int_hash_tests[i];
V_VT(&key) = VT_UI1|VT_BYREF;
V_UI1REF(&key) = &ui1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
}
/* nan */
@@ -533,10 +525,10 @@ static void test_hash_value(void)
V_R4(&key) = fx4.f;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ ||
- V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash));
+ V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "Unexpected hr %#lx.\n", V_I4(&hash));
/* inf */
fx4.f = 10.0;
@@ -547,9 +539,9 @@ static void test_hash_value(void)
V_R4(&key) = fx4.f;
V_I4(&hash) = 10;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
/* nan */
fx8.d = 10.0;
@@ -559,19 +551,19 @@ static void test_hash_value(void)
V_R8(&key) = fx8.d;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ ||
- V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash));
+ V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_DATE;
V_DATE(&key) = fx8.d;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ ||
- V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash));
+ V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "Unexpected hash %#lx.\n", V_I4(&hash));
/* inf */
fx8.d = 10.0;
@@ -583,17 +575,17 @@ static void test_hash_value(void)
V_R8(&key) = fx8.d;
V_I4(&hash) = 10;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_DATE;
V_DATE(&key) = fx8.d;
V_I4(&hash) = 10;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
for (i = 0; i < ARRAY_SIZE(float_hash_tests); i++) {
double dbl;
@@ -606,58 +598,52 @@ static void test_hash_value(void)
V_R4(&key) = float_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
flt = float_hash_tests[i];
V_VT(&key) = VT_R4|VT_BYREF;
V_R4REF(&key) = &flt;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_R8;
V_R8(&key) = float_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
dbl = float_hash_tests[i];
V_VT(&key) = VT_R8|VT_BYREF;
V_R8REF(&key) = &dbl;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_DATE;
V_DATE(&key) = float_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_DATE|VT_BYREF;
date = float_hash_tests[i];
V_DATEREF(&key) = &date;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
}
/* interface pointers as keys */
@@ -666,9 +652,9 @@ static void test_hash_value(void)
VariantInit(&hash);
V_I4(&hash) = 1;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x, expected 0\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
/* QI doesn't work */
V_VT(&key) = VT_UNKNOWN;
@@ -676,18 +662,18 @@ static void test_hash_value(void)
VariantInit(&hash);
expected = get_ptr_hash(&test_unk2);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UNKNOWN;
V_UNKNOWN(&key) = &test_unk;
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
/* interface without IDispatch support */
V_VT(&key) = VT_DISPATCH;
@@ -695,18 +681,18 @@ static void test_hash_value(void)
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
V_VT(&key) = VT_DISPATCH;
V_DISPATCH(&key) = &test_disp;
VariantInit(&hash);
expected = get_ptr_hash(&test_disp);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
/* same with BYREF */
if (0) { /* crashes on native */
@@ -720,9 +706,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
V_I4(&hash) = 1;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x, expected 0\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UNKNOWN|VT_BYREF;
unk = &test_unk;
@@ -730,9 +716,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
/* interface without IDispatch support */
V_VT(&key) = VT_DISPATCH|VT_BYREF;
@@ -741,9 +727,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
V_VT(&key) = VT_DISPATCH|VT_BYREF;
disp = &test_disp;
@@ -751,9 +737,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
expected = get_ptr_hash(&test_disp);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
IDictionary_Release(dict);
}
@@ -767,7 +753,7 @@ static void test_Exists(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) /* crashes on native */
hr = IDictionary_Exists(dict, NULL, NULL);
@@ -775,34 +761,34 @@ static void test_Exists(void)
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
hr = IDictionary_Exists(dict, &key, NULL);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
exists = VARIANT_TRUE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_FALSE, "got %x\n", exists);
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_R4;
V_R4(&key) = 0.0;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == CTL_E_KEY_ALREADY_EXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_KEY_ALREADY_EXISTS, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
hr = IDictionary_Exists(dict, &key, NULL);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
exists = VARIANT_FALSE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_TRUE, "got %x\n", exists);
/* key of different type, but resolves to same hash value */
@@ -810,7 +796,7 @@ static void test_Exists(void)
V_R4(&key) = 0.0;
exists = VARIANT_FALSE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_TRUE, "got %x\n", exists);
IDictionary_Release(dict);
@@ -825,14 +811,14 @@ static void test_Keys(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_Keys(dict, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&keys);
hr = IDictionary_Keys(dict, &keys);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&keys) == (VT_ARRAY|VT_VARIANT), "got %d\n", V_VT(&keys));
VariantClear(&keys);
@@ -840,25 +826,25 @@ static void test_Keys(void)
V_R4(&key) = 0.0;
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&keys);
hr = IDictionary_Keys(dict, &keys);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&keys) == (VT_ARRAY|VT_VARIANT), "got %d\n", V_VT(&keys));
VariantInit(&key);
index = 0;
hr = SafeArrayGetElement(V_ARRAY(&keys), &index, &key);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_R4, "got %d\n", V_VT(&key));
index = SafeArrayGetDim(V_ARRAY(&keys));
- ok(index == 1, "got %d\n", index);
+ ok(index == 1, "Unexpected value %ld.\n", index);
hr = SafeArrayGetUBound(V_ARRAY(&keys), 1, &index);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(index == 0, "got %d\n", index);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(index == 0, "Unexpected value %ld.\n", index);
VariantClear(&keys);
@@ -873,7 +859,7 @@ static void test_Remove(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0)
hr = IDictionary_Remove(dict, NULL);
@@ -882,14 +868,14 @@ static void test_Remove(void)
V_VT(&key) = VT_R4;
V_R4(&key) = 0.0;
hr = IDictionary_Remove(dict, &key);
- ok(hr == CTL_E_ELEMENT_NOT_FOUND, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ELEMENT_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_Remove(dict, &key);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDictionary_Release(dict);
}
@@ -902,21 +888,21 @@ static void test_Item(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 10;
V_VT(&item) = VT_I2;
V_I2(&item) = 123;
hr = IDictionary_get_Item(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&item) == VT_EMPTY, "got %d\n", V_VT(&item));
V_VT(&key) = VT_I2;
V_I2(&key) = 10;
V_VT(&item) = VT_I2;
hr = IDictionary_get_Item(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&item) == VT_EMPTY, "got %d\n", V_VT(&item));
IDictionary_Release(dict);
@@ -931,7 +917,7 @@ static void test_Add(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"testW");
V_VT(&key) = VT_I2;
@@ -939,10 +925,10 @@ static void test_Add(void)
V_VT(&item) = VT_BSTR|VT_BYREF;
V_BSTRREF(&item) = &str;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_get_Item(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&item) == VT_BSTR, "got %d\n", V_VT(&item));
SysFreeString(str);
@@ -961,107 +947,107 @@ static void test_IEnumVARIANT(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) /* crashes on native */
hr = IDictionary__NewEnum(dict, NULL);
hr = IDictionary__NewEnum(dict, &enum1);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary__NewEnum(dict, &enum2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(enum1 != enum2, "got %p, %p\n", enum2, enum1);
IUnknown_Release(enum2);
hr = IUnknown_QueryInterface(enum1, &IID_IEnumVARIANT, (void**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(enum1);
/* dictionary is empty */
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 1;
V_VT(&item) = VT_I4;
V_I4(&item) = 100;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 4000;
V_VT(&item) = VT_I4;
V_I4(&item) = 200;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
V_VT(&item) = VT_I4;
V_I4(&item) = 300;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key));
ok(V_I2(&key) == 1, "got %d\n", V_I2(&key));
- ok(fetched == 1, "got %u\n", fetched);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_Remove(dict, &key);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key));
ok(V_I2(&key) == 4000, "got %d\n", V_I2(&key));
- ok(fetched == 1, "got %u\n", fetched);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key));
ok(V_I2(&key) == 0, "got %d\n", V_I2(&key));
- ok(fetched == 1, "got %u\n", fetched);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
/* enumeration reached the bottom, add one more pair */
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 13;
V_VT(&item) = VT_I4;
V_I4(&item) = 350;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* still doesn't work until Reset() */
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
IEnumVARIANT_Release(enumvar);
IDictionary_Release(dict);
@@ -1077,7 +1063,7 @@ START_TEST(dictionary)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDispatch, (void**)&disp);
if(FAILED(hr)) {
- win_skip("Dictionary object is not supported: %08x\n", hr);
+ win_skip("Dictionary object is not supported: hr %#lx.\n", hr);
CoUninitialize();
return;
}
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 24b52384aa5..098060a90bb 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -69,10 +69,10 @@ static IDrive *get_fixed_drive(void)
HRESULT hr;
hr = IFileSystem3_get_Drives(fs3, &drives);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDriveCollection_get__NewEnum(drives, (IUnknown**)&iter);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDriveCollection_Release(drives);
while (1) {
@@ -84,14 +84,14 @@ static IDrive *get_fixed_drive(void)
drive = NULL;
break;
}
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IDrive, (void**)&drive);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&var);
hr = IDrive_get_DriveType(drive, &type);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (type == Fixed)
break;
@@ -112,13 +112,13 @@ static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
HRESULT hr;
hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void **)&classinfo);
- ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#lx.\n", hr);
hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
- ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &attr);
- ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#lx.\n", hr);
ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo %s, expected %s\n", wine_dbgstr_guid(&attr->guid),
wine_dbgstr_guid(guid));
@@ -153,59 +153,59 @@ static void test_interfaces(void)
test_provideclassinfo(disp, &CLSID_FileSystemObject);
hr = IDispatch_QueryInterface(disp, &IID_IObjectWithSite, (void**)&site);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
b = VARIANT_TRUE;
hr = IFileSystem3_FileExists(fs3, NULL, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got %x\n", b);
hr = IFileSystem3_FileExists(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x, expected 0x%08x\n", hr, E_POINTER);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
path = SysAllocString(L"path");
b = VARIANT_TRUE;
hr = IFileSystem3_FileExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got %x\n", b);
SysFreeString(path);
path = SysAllocString(file_path);
b = VARIANT_FALSE;
hr = IFileSystem3_FileExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "got %x\n", b);
SysFreeString(path);
path = SysAllocString(windows_path);
b = VARIANT_TRUE;
hr = IFileSystem3_FileExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got %x\n", b);
SysFreeString(path);
/* Folder Exists */
hr = IFileSystem3_FolderExists(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x, expected 0x%08x\n", hr, E_POINTER);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
path = SysAllocString(windows_path);
hr = IFileSystem3_FolderExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "Folder doesn't exists\n");
SysFreeString(path);
path = SysAllocString(L"c:\\Nonexistent");
hr = IFileSystem3_FolderExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "Folder exists\n");
SysFreeString(path);
path = SysAllocString(file_path);
hr = IFileSystem3_FolderExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "Folder exists\n");
SysFreeString(path);
@@ -222,13 +222,13 @@ static void test_createfolder(void)
get_temp_path(NULL, buffW);
ret = CreateDirectoryW(buffW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* create existing directory */
path = SysAllocString(buffW);
folder = (void*)0xdeabeef;
hr = IFileSystem3_CreateFolder(fs3, path, &folder);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
ok(folder == NULL, "got %p\n", folder);
SysFreeString(path);
RemoveDirectoryW(buffW);
@@ -250,98 +250,98 @@ static void test_textstream(void)
name = SysAllocString(testfileW);
b = VARIANT_FALSE;
hr = IFileSystem3_FileExists(fs3, name, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "got %x\n", b);
/* different mode combinations */
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting | ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_OpenTextFile(fs3, name, ForReading | ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting | ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_OpenTextFile(fs3, name, ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* try to write when open for reading */
hr = ITextStream_WriteLine(stream, name);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Write(stream, name);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_get_AtEndOfStream(stream, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == S_OK || broken(hr == S_FALSE), "got 0x%08x\n", hr);
+ ok(hr == S_OK || broken(hr == S_FALSE), "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "got 0x%x\n", b);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE || broken(b == 10), "got 0x%x\n", b);
b = 10;
hr = ITextStream_get_AtEndOfLine(stream, &b);
todo_wine {
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE || broken(b == 10), "got 0x%x\n", b);
}
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadLine(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadAll(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE || broken(b == 10), "got 0x%x\n", b);
b = 10;
hr = ITextStream_get_AtEndOfLine(stream, &b);
todo_wine {
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE || broken(b == 10), "got 0x%x\n", b);
}
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadLine(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadAll(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
@@ -352,10 +352,10 @@ todo_wine {
CloseHandle(file);
hr = IFileSystem3_OpenTextFile(fs3, name, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got 0x%x\n", b);
ITextStream_Release(stream);
@@ -376,7 +376,7 @@ static void test_GetFileVersion(void)
path = SysAllocString(filenameW);
hr = IFileSystem3_GetFileVersion(fs3, path, &version);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*version != 0, "got %s\n", wine_dbgstr_w(version));
SysFreeString(version);
SysFreeString(path);
@@ -387,7 +387,7 @@ static void test_GetFileVersion(void)
path = SysAllocString(filenameW);
version = (void*)0xdeadbeef;
hr = IFileSystem3_GetFileVersion(fs3, path, &version);
- ok(broken(hr == S_OK) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(broken(hr == S_OK) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
ok(*version == 0, "got %s\n", wine_dbgstr_w(version));
@@ -421,13 +421,13 @@ static void test_GetParentFolderName(void)
int i;
hr = IFileSystem3_GetParentFolderName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetParentFolderName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for(i=0; i < ARRAY_SIZE(tests); i++) {
result = (BSTR)0xdeadbeef;
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
hr = IFileSystem3_GetParentFolderName(fs3, path, &result);
- ok(hr == S_OK, "%d) GetParentFolderName returned %x, expected S_OK\n", i, hr);
+ ok(hr == S_OK, "%d: unexpected hr %#lx.\n", i, hr);
if(!tests[i].result)
ok(!result, "%d) result = %s\n", i, wine_dbgstr_w(result));
else
@@ -458,13 +458,13 @@ static void test_GetFileName(void)
int i;
hr = IFileSystem3_GetFileName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetFileName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for(i=0; i < ARRAY_SIZE(tests); i++) {
result = (BSTR)0xdeadbeef;
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
hr = IFileSystem3_GetFileName(fs3, path, &result);
- ok(hr == S_OK, "%d) GetFileName returned %x, expected S_OK\n", i, hr);
+ ok(hr == S_OK, "%d: unexpected hr %#lx.\n", i, hr);
if(!tests[i].result)
ok(!result, "%d) result = %s\n", i, wine_dbgstr_w(result));
else
@@ -480,10 +480,10 @@ static void test_GetTempName(void)
HRESULT hr;
hr = IFileSystem3_GetTempName(fs3, NULL);
- ok(hr == E_POINTER, "GetTempName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
result = (BSTR)0xdeadbeef;
hr = IFileSystem3_GetTempName(fs3, &result);
- ok(hr == S_OK, "GetTempName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!wcsstr( result,L".tmp"), "GetTempName returned %s, expected .tmp suffix\n", debugstr_w(result));
SysFreeString(result);
}
@@ -511,13 +511,13 @@ static void test_GetBaseName(void)
int i;
hr = IFileSystem3_GetBaseName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetBaseName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for(i=0; i < ARRAY_SIZE(tests); i++) {
result = (BSTR)0xdeadbeef;
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
hr = IFileSystem3_GetBaseName(fs3, path, &result);
- ok(hr == S_OK, "%d) GetBaseName returned %x, expected S_OK\n", i, hr);
+ ok(hr == S_OK, "%d, unexpected hr %#lx.\n", i, hr);
if(!tests[i].result)
ok(!result, "%d) result = %s\n", i, wine_dbgstr_w(result));
else
@@ -541,10 +541,10 @@ static void test_GetAbsolutePathName(void)
HRESULT hr;
hr = IFileSystem3_GetAbsolutePathName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetAbsolutePathName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetAbsolutePathName(fs3, NULL, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(L".", MAX_PATH, buf, NULL);
ok(!lstrcmpiW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf));
SysFreeString(result);
@@ -558,14 +558,14 @@ static void test_GetAbsolutePathName(void)
path = SysAllocString(dir_match1);
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(dir_match1, MAX_PATH, buf2, NULL);
ok(!lstrcmpiW(buf2, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf2));
SysFreeString(result);
ok(CreateDirectoryW(dir1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir1));
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(dir1, MAX_PATH, buf, NULL);
ok(!lstrcmpiW(buf, result) || broken(!lstrcmpiW(buf2, result)), "result = %s, expected %s\n",
wine_dbgstr_w(result), wine_dbgstr_w(buf));
@@ -573,7 +573,7 @@ static void test_GetAbsolutePathName(void)
ok(CreateDirectoryW(dir2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir2));
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if(!lstrcmpiW(buf, result) || !lstrcmpiW(buf2, result)) {
ok(!lstrcmpiW(buf, result) || broken(!lstrcmpiW(buf2, result)), "result = %s, expected %s\n",
wine_dbgstr_w(result), wine_dbgstr_w(buf));
@@ -587,7 +587,7 @@ static void test_GetAbsolutePathName(void)
SysFreeString(path);
path = SysAllocString(dir_match2);
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(dir_match2, MAX_PATH, buf, NULL);
ok(!lstrcmpiW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf));
SysFreeString(result);
@@ -614,14 +614,14 @@ static void test_GetFile(void)
path = SysAllocString(pathW);
hr = IFileSystem3_GetFile(fs3, path, NULL);
- ok(hr == E_POINTER, "GetFile returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetFile(fs3, NULL, &file);
- ok(hr == E_INVALIDARG, "GetFile returned %x, expected E_INVALIDARG\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
file = (IFile*)0xdeadbeef;
hr = IFileSystem3_GetFile(fs3, path, &file);
ok(!file, "file != NULL\n");
- ok(hr == CTL_E_FILENOTFOUND, "GetFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
hf = CreateFileW(pathW, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_READONLY, NULL);
if(hf == INVALID_HANDLE_VALUE) {
@@ -632,21 +632,21 @@ static void test_GetFile(void)
CloseHandle(hf);
hr = IFileSystem3_GetFile(fs3, path, &file);
- ok(hr == S_OK, "GetFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFile_get_DateLastModified(file, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
date = 0.0;
hr = IFile_get_DateLastModified(file, &date);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(date > 0.0, "got %f\n", date);
hr = IFile_get_Path(file, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFile_get_Path(file, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpiW(str, pathW), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -656,53 +656,52 @@ static void test_GetFile(void)
hr = IFile_get_Attributes(file, &fa);
gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK;
- ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
- ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(fa == gfa, "Unexpected flags %#x, expected %lx.\n", fa, gfa);
hr = IFile_put_Attributes(file, gfa | FILE_ATTRIBUTE_READONLY);
- ok(hr == S_OK, "put_Attributes failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
new_gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK;
- ok(new_gfa == (gfa|FILE_ATTRIBUTE_READONLY), "new_gfa = %x, expected %x\n", new_gfa, gfa|FILE_ATTRIBUTE_READONLY);
+ ok(new_gfa == (gfa|FILE_ATTRIBUTE_READONLY), "Unexpected flags %#lx, expected %lx\n", new_gfa, gfa|FILE_ATTRIBUTE_READONLY);
hr = IFile_get_Attributes(file, &fa);
- ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
- ok(fa == new_gfa, "fa = %x, expected %x\n", fa, new_gfa);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(fa == new_gfa, "Unexpected flags %#x, expected %lx.\n", fa, new_gfa);
hr = IFile_put_Attributes(file, gfa);
- ok(hr == S_OK, "put_Attributes failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
new_gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK;
- ok(new_gfa == gfa, "new_gfa = %x, expected %x\n", new_gfa, gfa);
+ ok(new_gfa == gfa, "Unexpected flags %#lx, expected %lx.\n", new_gfa, gfa);
hr = IFile_get_Attributes(file, &fa);
- ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
- ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(fa == gfa, "Unexpected flags %#x, expected %lx.\n", fa, gfa);
hr = IFile_get_Size(file, &size);
- ok(hr == S_OK, "get_Size returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_I4, "V_VT(&size) = %d, expected VT_I4\n", V_VT(&size));
- ok(V_I4(&size) == 0, "V_I4(&size) = %d, expected 0\n", V_I4(&size));
+ ok(V_I4(&size) == 0, "V_I4(&size) = %ld, expected 0\n", V_I4(&size));
IFile_Release(file);
hr = IFileSystem3_DeleteFile(fs3, path, FALSE);
- ok(hr==CTL_E_PERMISSIONDENIED || broken(hr==S_OK),
- "DeleteFile returned %x, expected CTL_E_PERMISSIONDENIED\n", hr);
+ ok(hr == CTL_E_PERMISSIONDENIED || broken(hr == S_OK), "Unexpected hr %#lx.\n", hr);
if(hr != S_OK) {
hr = IFileSystem3_DeleteFile(fs3, path, TRUE);
- ok(hr == S_OK, "DeleteFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
}
hr = IFileSystem3_DeleteFile(fs3, path, TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "DeleteFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(path);
/* try with directory */
lstrcatW(pathW, L"\\");
ret = CreateDirectoryW(pathW, NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
path = SysAllocString(pathW);
hr = IFileSystem3_GetFile(fs3, path, &file);
- ok(hr == CTL_E_FILENOTFOUND, "GetFile returned %x, expected S_OK\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(path);
RemoveDirectoryW(pathW);
@@ -743,36 +742,36 @@ static void test_CopyFolder(void)
create_path(filesystem3_dir, dstW, tmp);
bdst = SysAllocString(tmp);
hr = IFileSystem3_CopyFile(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "CopyFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_PATHNOTFOUND, "CopyFolder returned %x, expected CTL_E_PATHNOTFOUND\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
ok(create_file(bsrc), "can't create %s file\n", wine_dbgstr_w(bsrc));
hr = IFileSystem3_CopyFile(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_PATHNOTFOUND, "CopyFolder returned %x, expected CTL_E_PATHNOTFOUND\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_DeleteFile(fs3, bsrc, VARIANT_FALSE);
- ok(hr == S_OK, "DeleteFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(CreateDirectoryW(bsrc, NULL), "can't create %s\n", wine_dbgstr_w(bsrc));
hr = IFileSystem3_CopyFile(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "CopyFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_FILEALREADYEXISTS, "CopyFolder returned %x, expected CTL_E_FILEALREADYEXISTS\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_DeleteFile(fs3, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "DeleteFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
create_path(tmp, src1W, tmp);
ok(GetFileAttributesW(tmp) == INVALID_FILE_ATTRIBUTES,
"%s file exists\n", wine_dbgstr_w(tmp));
@@ -782,7 +781,7 @@ static void test_CopyFolder(void)
SysFreeString(bdst);
bdst = SysAllocString(tmp);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
create_path(tmp, src1W, tmp);
ok(GetFileAttributesW(tmp) != INVALID_FILE_ATTRIBUTES,
"%s directory doesn't exist\n", wine_dbgstr_w(tmp));
@@ -795,17 +794,17 @@ static void test_CopyFolder(void)
SysFreeString(bsrc);
bsrc = SysAllocString(tmp);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
create_path(filesystem3_dir, dstW, tmp);
create_path(tmp, src1W, tmp);
ok(GetFileAttributesW(tmp) != INVALID_FILE_ATTRIBUTES,
"%s directory doesn't exist\n", wine_dbgstr_w(tmp));
hr = IFileSystem3_DeleteFolder(fs3, bdst, VARIANT_FALSE);
- ok(hr == S_OK, "DeleteFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_PATHNOTFOUND, "CopyFolder returned %x, expected CTL_E_PATHNOTFOUND\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
create_path(filesystem3_dir, src1W, tmp);
SysFreeString(bsrc);
@@ -813,19 +812,19 @@ static void test_CopyFolder(void)
create_path(tmp, src1W, tmp);
ok(create_file(tmp), "can't create %s file\n", wine_dbgstr_w(tmp));
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_FALSE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_FALSE);
- ok(hr == CTL_E_FILEALREADYEXISTS, "CopyFolder returned %x, expected CTL_E_FILEALREADYEXISTS\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(bsrc);
SysFreeString(bdst);
bsrc = SysAllocString(filesystem3_dir);
hr = IFileSystem3_DeleteFolder(fs3, bsrc, VARIANT_FALSE);
- ok(hr == S_OK, "DeleteFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(bsrc);
}
@@ -868,18 +867,18 @@ static void test_BuildPath(void)
int i = 0;
hr = IFileSystem3_BuildPath(fs3, NULL, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = (BSTR)0xdeadbeef;
hr = IFileSystem3_BuildPath(fs3, NULL, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*ret == 0, "got %p\n", ret);
SysFreeString(ret);
ret = (BSTR)0xdeadbeef;
path = bstr_from_str("path");
hr = IFileSystem3_BuildPath(fs3, path, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(ret, path), "got %s\n", wine_dbgstr_w(ret));
SysFreeString(ret);
SysFreeString(path);
@@ -887,7 +886,7 @@ static void test_BuildPath(void)
ret = (BSTR)0xdeadbeef;
path = bstr_from_str("path");
hr = IFileSystem3_BuildPath(fs3, NULL, path, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(ret, path), "got %s\n", wine_dbgstr_w(ret));
SysFreeString(ret);
SysFreeString(path);
@@ -901,7 +900,7 @@ static void test_BuildPath(void)
name = bstr_from_str(ptr->name);
result = bstr_from_str(ptr->result);
hr = IFileSystem3_BuildPath(fs3, path, name, &ret);
- ok(hr == S_OK, "%d: got 0x%08x\n", i, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", i, hr);
if (hr == S_OK)
{
ok(!lstrcmpW(ret, result), "%d: got wrong path %s, expected %s\n", i, wine_dbgstr_w(ret),
@@ -926,28 +925,28 @@ static void test_GetFolder(void)
folder = (void*)0xdeadbeef;
hr = IFileSystem3_GetFolder(fs3, NULL, &folder);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ok(folder == NULL, "got %p\n", folder);
hr = IFileSystem3_GetFolder(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* something that doesn't exist */
str = SysAllocString(L"dummy");
hr = IFileSystem3_GetFolder(fs3, str, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
folder = (void*)0xdeadbeef;
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == CTL_E_PATHNOTFOUND, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
ok(folder == NULL, "got %p\n", folder);
SysFreeString(str);
GetWindowsDirectoryW(buffW, MAX_PATH);
str = SysAllocString(buffW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
test_provideclassinfo(folder, &CLSID_Folder);
IFolder_Release(folder);
@@ -961,17 +960,17 @@ static void _test_clone(IEnumVARIANT *enumvar, BOOL position_inherited, LONG cou
VARIANT var, var2;
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
VariantInit(&var);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 1, "%d: got %d\n", line, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", line, fetched);
/* clone enumerator */
hr = IEnumVARIANT_Clone(enumvar, &clone);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
ok(clone != enumvar, "%d: got %p, %p\n", line, enumvar, clone);
/* check if clone inherits position */
@@ -980,21 +979,21 @@ static void _test_clone(IEnumVARIANT *enumvar, BOOL position_inherited, LONG cou
hr = IEnumVARIANT_Next(clone, 1, &var2, &fetched);
if (position_inherited && count == 1)
{
- ok(hr == S_FALSE, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 0, "%d: got %d\n", line, fetched);
+ ok(hr == S_FALSE, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(!fetched, "%d: unexpected value %lu.\n", line, fetched);
}
else
{
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 1, "%d: got %d\n", line, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", line, fetched);
if (!position_inherited)
todo_wine ok(V_DISPATCH(&var) == V_DISPATCH(&var2), "%d: values don't match\n", line);
else
{
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 1, "%d: got %d\n", line, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", line, fetched);
todo_wine ok(V_DISPATCH(&var) == V_DISPATCH(&var2), "%d: values don't match\n", line);
}
}
@@ -1004,7 +1003,7 @@ static void _test_clone(IEnumVARIANT *enumvar, BOOL position_inherited, LONG cou
IEnumVARIANT_Release(clone);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
}
#define test_clone(a, b, c) _test_clone(a, b, c, __LINE__)
@@ -1017,7 +1016,7 @@ static void test_FolderCollection(void)
IFolderCollection *folders;
WCHAR buffW[MAX_PATH], pathW[MAX_PATH];
IEnumVARIANT *enumvar;
- LONG count, ref, ref2, i;
+ LONG count, ref, ref2;
IUnknown *unk, *unk2;
IFolder *folder;
ULONG fetched;
@@ -1025,23 +1024,24 @@ static void test_FolderCollection(void)
HRESULT hr;
BSTR str;
int found_a = 0, found_b = 0, found_c = 0;
+ unsigned int i;
get_temp_path(L"foo", buffW);
CreateDirectoryW(buffW, NULL);
str = SysAllocString(buffW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IFolder_get_SubFolders(folder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpiW(buffW, str), "got %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(buffW));
SysFreeString(str);
@@ -1054,14 +1054,14 @@ static void test_FolderCollection(void)
CreateDirectoryW(pathW, NULL);
hr = IFolder_get_SubFolders(folder, &folders);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(folders, &CLSID_Folders);
IFolder_Release(folder);
count = 0;
hr = IFolderCollection_get_Count(folders, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 2, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 2, "Unexpected value %lu.\n", count);
lstrcpyW(pathW, buffW);
lstrcatW(pathW, cW);
@@ -1070,37 +1070,37 @@ static void test_FolderCollection(void)
/* every time property is requested it scans directory */
count = 0;
hr = IFolderCollection_get_Count(folders, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 3, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 3, "Unexpected value %lu.\n", count);
hr = IFolderCollection_get__NewEnum(folders, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFolderCollection_QueryInterface(folders, &IID_IEnumVARIANT, (void**)&unk);
- ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* NewEnum creates new instance each time it's called */
ref = GET_REFCOUNT(folders);
unk = NULL;
hr = IFolderCollection_get__NewEnum(folders, &unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(folders);
- ok(ref2 == ref + 1, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref + 1, "Unexpected value %ld, %ld.\n", ref2, ref);
unk2 = NULL;
hr = IFolderCollection_get__NewEnum(folders, &unk2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk != unk2, "got %p, %p\n", unk2, unk);
IUnknown_Release(unk2);
/* now get IEnumVARIANT */
ref = GET_REFCOUNT(folders);
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(folders);
- ok(ref2 == ref, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref, "Unexpected value %ld, %ld.\n", ref2, ref);
test_clone(enumvar, FALSE, count);
@@ -1109,16 +1109,16 @@ static void test_FolderCollection(void)
VariantInit(&var);
fetched = 0;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", i, hr);
- ok(fetched == 1, "%d: got %d\n", i, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", i, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", i, fetched);
ok(V_VT(&var) == VT_DISPATCH, "%d: got type %d\n", i, V_VT(&var));
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IFolder, (void**)&folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = IFolder_get_Name(folder, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!lstrcmpW(str, aW + 1))
found_a++;
else if (!lstrcmpW(str, bW + 1))
@@ -1140,26 +1140,26 @@ static void test_FolderCollection(void)
VariantInit(&var);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&var2[0]);
VariantInit(&var2[1]);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 0, var2, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 1, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
ok(V_VT(&var2[0]) == VT_DISPATCH, "got type %d\n", V_VT(&var2[0]));
VariantClear(&var2[0]);
VariantClear(&var2[1]);
@@ -1192,7 +1192,7 @@ static void test_FileCollection(void)
IFileCollection *files;
IFile *file;
IEnumVARIANT *enumvar;
- LONG count, ref, ref2, i;
+ LONG count, ref, ref2;
IUnknown *unk, *unk2;
ULONG fetched;
VARIANT var, var2[2];
@@ -1200,17 +1200,18 @@ static void test_FileCollection(void)
BSTR str;
HANDLE file_a, file_b, file_c;
int found_a = 0, found_b = 0, found_c = 0;
+ unsigned int i;
get_temp_path(L"\\foo", buffW);
CreateDirectoryW(buffW, NULL);
str = SysAllocString(buffW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IFolder_get_Files(folder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
lstrcpyW(pathW, buffW);
lstrcatW(pathW, aW);
@@ -1222,14 +1223,14 @@ static void test_FileCollection(void)
FILE_FLAG_DELETE_ON_CLOSE, 0);
hr = IFolder_get_Files(folder, &files);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(files, &CLSID_Files);
IFolder_Release(folder);
count = 0;
hr = IFileCollection_get_Count(files, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 2, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 2, "Unexpected value %lu.\n", count);
lstrcpyW(pathW, buffW);
lstrcatW(pathW, cW);
@@ -1239,37 +1240,37 @@ static void test_FileCollection(void)
/* every time property is requested it scans directory */
count = 0;
hr = IFileCollection_get_Count(files, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 3, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 3, "Unexpected value %lu.\n", count);
hr = IFileCollection_get__NewEnum(files, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileCollection_QueryInterface(files, &IID_IEnumVARIANT, (void**)&unk);
- ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* NewEnum creates new instance each time it's called */
ref = GET_REFCOUNT(files);
unk = NULL;
hr = IFileCollection_get__NewEnum(files, &unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(files);
- ok(ref2 == ref + 1, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref + 1, "Unexpected value %ld, %ld.\n", ref2, ref);
unk2 = NULL;
hr = IFileCollection_get__NewEnum(files, &unk2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk != unk2, "got %p, %p\n", unk2, unk);
IUnknown_Release(unk2);
/* now get IEnumVARIANT */
ref = GET_REFCOUNT(files);
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(files);
- ok(ref2 == ref, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref, "Unexpected value %ld, %ld.\n", ref2, ref);
test_clone(enumvar, FALSE, count);
@@ -1278,17 +1279,17 @@ static void test_FileCollection(void)
VariantInit(&var);
fetched = 0;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", i, hr);
- ok(fetched == 1, "%d: got %d\n", i, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", i, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", i, fetched);
ok(V_VT(&var) == VT_DISPATCH, "%d: got type %d\n", i, V_VT(&var));
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IFile, (void **)&file);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(file, &CLSID_File);
str = NULL;
hr = IFile_get_Name(file, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!lstrcmpW(str, aW + 1))
found_a++;
else if (!lstrcmpW(str, bW + 1))
@@ -1310,26 +1311,26 @@ static void test_FileCollection(void)
VariantInit(&var);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&var2[0]);
VariantInit(&var2[1]);
- fetched = -1;
+ fetched = 1;
hr = IEnumVARIANT_Next(enumvar, 0, var2, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
- fetched = -1;
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
+ fetched = 0;
hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 1, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
ok(V_VT(&var2[0]) == VT_DISPATCH, "got type %d\n", V_VT(&var2[0]));
VariantClear(&var2[0]);
VariantClear(&var2[1]);
@@ -1355,35 +1356,35 @@ static void test_DriveCollection(void)
LONG count;
hr = IFileSystem3_get_Drives(fs3, &drives);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(drives, &CLSID_Drives);
hr = IDriveCollection_get__NewEnum(drives, (IUnknown**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDriveCollection_get_Count(drives, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
count = 0;
hr = IDriveCollection_get_Count(drives, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count > 0, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count > 0, "Unexpected value %ld.\n", count);
V_VT(&var) = VT_EMPTY;
- fetched = -1;
+ fetched = 1;
hr = IEnumVARIANT_Next(enumvar, 0, &var, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
test_clone(enumvar, TRUE, count);
@@ -1393,39 +1394,39 @@ static void test_DriveCollection(void)
BSTR str;
hr = IDrive_get_DriveType(drive, &type);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_DriveLetter(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_DriveLetter(drive, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(SysStringLen(str) == 1, "got string %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = IDrive_get_IsReady(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_TotalSize(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_AvailableSpace(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_FreeSpace(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
if (type == Fixed) {
VARIANT_BOOL ready = VARIANT_FALSE;
VARIANT size;
hr = IDrive_get_IsReady(drive, &ready);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ready == VARIANT_TRUE, "got %x\n", ready);
if (ready != VARIANT_TRUE) {
hr = IDrive_get_DriveLetter(drive, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
skip("Drive %s is not ready, skipping some tests\n", wine_dbgstr_w(str));
@@ -1436,30 +1437,30 @@ static void test_DriveCollection(void)
V_VT(&size) = VT_EMPTY;
hr = IDrive_get_TotalSize(drive, &size);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_R8 || V_VT(&size) == VT_I4, "got %d\n", V_VT(&size));
if (V_VT(&size) == VT_R8)
ok(V_R8(&size) > 0, "got %f\n", V_R8(&size));
else
- ok(V_I4(&size) > 0, "got %d\n", V_I4(&size));
+ ok(V_I4(&size) > 0, "got %ld\n", V_I4(&size));
V_VT(&size) = VT_EMPTY;
hr = IDrive_get_AvailableSpace(drive, &size);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_R8 || V_VT(&size) == VT_I4, "got %d\n", V_VT(&size));
if (V_VT(&size) == VT_R8)
ok(V_R8(&size) > (double)INT_MAX, "got %f\n", V_R8(&size));
else
- ok(V_I4(&size) > 0, "got %d\n", V_I4(&size));
+ ok(V_I4(&size) > 0, "got %ld\n", V_I4(&size));
V_VT(&size) = VT_EMPTY;
hr = IDrive_get_FreeSpace(drive, &size);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_R8 || V_VT(&size) == VT_I4, "got %d\n", V_VT(&size));
if (V_VT(&size) == VT_R8)
ok(V_R8(&size) > 0, "got %f\n", V_R8(&size));
else
- ok(V_I4(&size) > 0, "got %d\n", V_I4(&size));
+ ok(V_I4(&size) > 0, "got %ld\n", V_I4(&size));
}
VariantClear(&var);
}
@@ -1491,27 +1492,27 @@ static void test_CreateTextFile(void)
/* dir doesn't exist */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == CTL_E_PATHNOTFOUND, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(stream, &CLSID_TextStream);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
@@ -1522,16 +1523,16 @@ static void test_CreateTextFile(void)
/* try to create again with no-overwrite mode */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
/* now overwrite */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* overwrite in Unicode mode, check for BOM */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1539,7 +1540,7 @@ static void test_CreateTextFile(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffW, sizeof(buffW), &r, NULL);
- ok(ret && r == 2, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r == 2, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
ok( buffW[0] == 0xfeff, "got %04x\n", buffW[0] );
CloseHandle(file);
@@ -1566,29 +1567,29 @@ static void test_FolderCreateTextFile(void)
lstrcatW(pathW, nameW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
str = SysAllocString(dirW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(stream, &CLSID_TextStream);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
@@ -1599,16 +1600,16 @@ static void test_FolderCreateTextFile(void)
/* try to create again with no-overwrite mode */
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
/* now overwrite */
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* overwrite in Unicode mode, check for BOM */
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_TRUE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1616,7 +1617,7 @@ static void test_FolderCreateTextFile(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffW, sizeof(buffW), &r, NULL);
- ok(ret && r==2, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r == 2, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
buffW[r/sizeof(WCHAR)] = 0;
buff2W[0] = 0xfeff;
@@ -1644,15 +1645,15 @@ static void test_WriteLine(void)
get_temp_filepath(testfileW, pathW, dirW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* create as ASCII file first */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_WriteLine(stream, nameW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1660,7 +1661,7 @@ static void test_WriteLine(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffA, sizeof(buffA), &r, NULL);
- ok(ret && r, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
len = MultiByteToWideChar(CP_ACP, 0, buffA, r, buffW, ARRAY_SIZE(buffW));
buffW[len] = 0;
@@ -1672,10 +1673,10 @@ static void test_WriteLine(void)
/* same for unicode file */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_WriteLine(stream, nameW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1683,7 +1684,7 @@ static void test_WriteLine(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffW, sizeof(buffW), &r, NULL);
- ok(ret && r, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
buffW[r/sizeof(WCHAR)] = 0;
buff2W[0] = 0xfeff;
@@ -1714,43 +1715,43 @@ static void test_ReadAll(void)
get_temp_filepath(testfileW, pathW, dirW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* Unicode file -> read with ascii stream */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(firstlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(secondlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = ITextStream_ReadAll(stream, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadAll(stream, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Buffer content is not interpreted - BOM is kept, all data is converted to WCHARs */
str = NULL;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
buffW[0] = 0;
lstrcpyA(buffA, utf16bom);
lstrcatA(buffA, "first");
@@ -1761,7 +1762,7 @@ static void test_ReadAll(void)
/* Unicode file -> read with unicode stream */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcpyW(buffW, firstlineW);
lstrcatW(buffW, L"\r\n");
@@ -1769,30 +1770,30 @@ static void test_ReadAll(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
/* ReadAll one more time */
str = (void*)0xdeadbeef;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
/* ReadLine fails the same way */
str = (void*)0xdeadbeef;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
ITextStream_Release(stream);
/* Open again and skip first line before ReadAll */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str != NULL, "got %p\n", str);
ok(!wcscmp(str, firstlineW), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -1801,7 +1802,7 @@ static void test_ReadAll(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
ITextStream_Release(stream);
@@ -1809,19 +1810,19 @@ static void test_ReadAll(void)
/* ASCII file, read with Unicode stream */
/* 1. one byte content, not enough for Unicode read */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(aW);
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
ITextStream_Release(stream);
@@ -1846,59 +1847,59 @@ static void test_Read(void)
get_temp_filepath(testfileW, pathW, dirW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* Unicode file -> read with ascii stream */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(firstlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(secondlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = ITextStream_Read(stream, 0, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, -1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, -1, &str);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 0, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
/* Buffer content is not interpreted - BOM is kept, all data is converted to WCHARs */
str = NULL;
hr = ITextStream_Read(stream, 2, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
buffW[0] = 0;
lstrcpyA(buffA, utf16bom);
@@ -1911,7 +1912,7 @@ static void test_Read(void)
/* Unicode file -> read with unicode stream */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcpyW(buffW, firstlineW);
lstrcatW(buffW, L"\r\n");
@@ -1919,30 +1920,30 @@ static void test_Read(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
/* ReadAll one more time */
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 10, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
/* ReadLine fails the same way */
str = (void*)0xdeadbeef;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef), "got %p\n", str);
ITextStream_Release(stream);
/* Open again and skip first line before ReadAll */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str != NULL, "got %p\n", str);
SysFreeString(str);
@@ -1950,14 +1951,14 @@ static void test_Read(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_Read(stream, 100, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
ITextStream_Release(stream);
/* default read will use Unicode */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcpyW(buffW, firstlineW);
lstrcatW(buffW, L"\r\n");
@@ -1965,7 +1966,7 @@ static void test_Read(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -1973,22 +1974,22 @@ static void test_Read(void)
/* default append will use Unicode */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForAppending, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"123");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcatW(buffW, L"123");
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -1996,60 +1997,60 @@ static void test_Read(void)
/* default write will use ASCII */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForWriting, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"123");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"123"), "got %s\n", wine_dbgstr_w(str));
ITextStream_Release(stream);
/* ASCII file, read with default stream */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"test");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"test"), "got %s\n", wine_dbgstr_w(str));
ITextStream_Release(stream);
/* default append will use Unicode */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForAppending, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"123");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(L"test123", str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -2057,21 +2058,21 @@ static void test_Read(void)
/* default write will use ASCII as well */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForWriting, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"test string");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"test string"), "got %s\n", wine_dbgstr_w(str));
ITextStream_Release(stream);
@@ -2079,19 +2080,19 @@ static void test_Read(void)
/* ASCII file, read with Unicode stream */
/* 1. one byte content, not enough for Unicode read */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"A");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
ITextStream_Release(stream);
@@ -2099,25 +2100,25 @@ static void test_Read(void)
/* ASCII file, read with Unicode stream */
/* 3. one byte content, 2 are interpreted as a character, 3rd is lost */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"abc");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(SysStringLen(str) == 1, "len = %u\n", SysStringLen(str));
SysFreeString(str);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
ITextStream_Release(stream);
@@ -2143,7 +2144,7 @@ static void test_ReadLine(void)
get_temp_filepath(L"test.txt", path, dir);
ret = CreateDirectoryW(dir, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
@@ -2155,45 +2156,45 @@ static void test_ReadLine(void)
str = SysAllocString(path);
hr = IFileSystem3_OpenTextFile(fs3, str, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
for (i = 0; i < 1000; i++)
{
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"first line"), "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"second"), "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!*str, "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"\rt\r\re \rst"), "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
}
str = NULL;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(!str, "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
ITextStream_Release(stream);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile failed: %u\n", GetLastError());
+ ok(ret, "Unexpected retval %ld.\n", GetLastError());
ret = RemoveDirectoryW(dir);
- ok(ret, "RemoveDirectory failed: %u\n", GetLastError());
+ ok(ret, "Unexpected retval %ld.\n", GetLastError());
}
struct driveexists_test {
@@ -2225,16 +2226,16 @@ static void test_DriveExists(void)
WCHAR root[] = L"?:\\";
hr = IFileSystem3_DriveExists(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = VARIANT_TRUE;
hr = IFileSystem3_DriveExists(fs3, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret == VARIANT_FALSE, "got %x\n", ret);
drivespec = SysAllocString(root);
hr = IFileSystem3_DriveExists(fs3, drivespec, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
SysFreeString(drivespec);
for (; *ptr->drivespec; ptr++) {
@@ -2254,7 +2255,7 @@ static void test_DriveExists(void)
drivespec[0] = root[0];
ret = ptr->expected_ret == VARIANT_TRUE ? VARIANT_FALSE : VARIANT_TRUE;
hr = IFileSystem3_DriveExists(fs3, drivespec, &ret);
- ok(hr == S_OK, "got 0x%08x for drive spec %s (%s)\n",
+ ok(hr == S_OK, "Unexpected hr %#lx. for drive spec %s (%s)\n",
hr, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
ok(ret == ptr->expected_ret, "got %d, expected %d for drive spec %s (%s)\n",
ret, ptr->expected_ret, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
@@ -2264,7 +2265,7 @@ static void test_DriveExists(void)
ret = ptr->expected_ret == VARIANT_TRUE ? VARIANT_FALSE : VARIANT_TRUE;
hr = IFileSystem3_DriveExists(fs3, drivespec, &ret);
- ok(hr == S_OK, "got 0x%08x for drive spec %s (%s)\n",
+ ok(hr == S_OK, "Unexpected hr %#lx. for drive spec %s (%s)\n",
hr, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
ok(ret == ptr->expected_ret, "got %d, expected %d for drive spec %s (%s)\n",
ret, ptr->expected_ret, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
@@ -2296,18 +2297,18 @@ static void test_GetDriveName(void)
BSTR name;
hr = IFileSystem3_GetDriveName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
name = (void*)0xdeadbeef;
hr = IFileSystem3_GetDriveName(fs3, NULL, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(name == NULL, "got %p\n", name);
while (*ptr->path) {
BSTR path = SysAllocString(ptr->path);
name = (void*)0xdeadbeef;
hr = IFileSystem3_GetDriveName(fs3, path, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (name)
ok(!lstrcmpW(ptr->drive, name), "got %s, expected %s\n", wine_dbgstr_w(name), wine_dbgstr_w(ptr->drive));
else
@@ -2333,7 +2334,7 @@ static void test_GetDrive(void)
drive = (void*)0xdeadbeef;
hr = IFileSystem3_GetDrive(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(drive == (void*)0xdeadbeef, "got %p\n", drive);
for (root[0] = 'A'; root[0] <= 'Z'; root[0]++)
@@ -2346,7 +2347,7 @@ static void test_GetDrive(void)
drivespec = SysAllocString(root);
drive = (void*)0xdeadbeef;
hr = IFileSystem3_GetDrive(fs3, drivespec, &drive);
- ok(hr == CTL_E_DEVICEUNAVAILABLE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_DEVICEUNAVAILABLE, "Unexpected hr %#lx.\n", hr);
ok(drive == NULL, "got %p\n", drive);
SysFreeString(drivespec);
}
@@ -2358,7 +2359,7 @@ static void test_GetDrive(void)
}
hr = IDrive_get_DriveLetter(drive_fixed, &dl_fixed);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (FAILED(hr))
skip("Could not retrieve drive letter of fixed drive, skipping test.\n");
@@ -2383,7 +2384,7 @@ static void test_GetDrive(void)
drivespec = SysAllocString(ptr->drivespec);
drive = (void*)0xdeadbeef;
hr = IFileSystem3_GetDrive(fs3, drivespec, &drive);
- ok(hr == ptr->res, "got 0x%08x, expected 0x%08x for drive spec %s\n",
+ ok(hr == ptr->res, "Unexpected hr %#lx, expected %#lx for drive spec %s.\n",
hr, ptr->res, wine_dbgstr_w(ptr->drivespec));
ok(!lstrcmpW(ptr->drivespec, drivespec), "GetDrive modified its DriveSpec argument\n");
SysFreeString(drivespec);
@@ -2391,7 +2392,7 @@ static void test_GetDrive(void)
if (*ptr->driveletter) {
BSTR driveletter;
hr = IDrive_get_DriveLetter(drive, &driveletter);
- ok(hr == S_OK, "got 0x%08x for drive spec %s\n", hr, wine_dbgstr_w(ptr->drivespec));
+ ok(hr == S_OK, "Unexpected hr %#lx. for drive spec %s\n", hr, wine_dbgstr_w(ptr->drivespec));
if (SUCCEEDED(hr)) {
ok(!lstrcmpW(ptr->driveletter, driveletter), "got %s, expected %s for drive spec %s\n",
wine_dbgstr_w(driveletter), wine_dbgstr_w(ptr->driveletter),
@@ -2421,28 +2422,28 @@ static void test_SerialNumber(void)
}
hr = IDrive_get_SerialNumber(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
serial = 0xdeadbeef;
hr = IDrive_get_SerialNumber(drive, &serial);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(serial != 0xdeadbeef, "got %x\n", serial);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(serial != 0xdeadbeef, "Unexpected value %#lx.\n", serial);
hr = IDrive_get_FileSystem(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
name = NULL;
hr = IDrive_get_FileSystem(drive, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(name != NULL, "got %p\n", name);
SysFreeString(name);
hr = IDrive_get_VolumeName(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
name = NULL;
hr = IDrive_get_VolumeName(drive, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(name != NULL, "got %p\n", name);
SysFreeString(name);
@@ -2470,7 +2471,7 @@ static void test_GetExtensionName(void)
path = SysAllocString(extension_tests[i].path);
ext = NULL;
hr = IFileSystem3_GetExtensionName(fs3, path, &ext);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (*extension_tests[i].ext)
ok(!lstrcmpW(ext, extension_tests[i].ext), "%d: path %s, got %s, expected %s\n", i,
wine_dbgstr_w(path), wine_dbgstr_w(ext), wine_dbgstr_w(extension_tests[i].ext));
@@ -2492,36 +2493,36 @@ static void test_GetSpecialFolder(void)
BSTR path;
hr = IFileSystem3_GetSpecialFolder(fs3, WindowsFolder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder+1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder+1, &folder);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetSpecialFolder(fs3, WindowsFolder, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &path);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW));
ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW));
SysFreeString(path);
IFolder_Release(folder);
hr = IFileSystem3_GetSpecialFolder(fs3, SystemFolder, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &path);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW));
ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW));
SysFreeString(path);
IFolder_Release(folder);
hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &path);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ret = GetTempPathW(ARRAY_SIZE(pathW), pathW);
if (ret && pathW[ret-1] == '\\')
pathW[ret-1] = 0;
@@ -2539,56 +2540,56 @@ static void test_MoveFile(void)
str = SysAllocString(L"test.txt");
hr = IFileSystem3_CreateTextFile(fs3, str, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"test");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "Write failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
str = SysAllocString(L"test2.txt");
hr = IFileSystem3_CreateTextFile(fs3, str, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
src = SysAllocString(L"test.txt");
dst = SysAllocString(L"test3.txt");
hr = IFileSystem3_MoveFile(fs3, src, dst);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
str = SysAllocString(L"test.txt");
hr = IFileSystem3_DeleteFile(fs3, str, VARIANT_TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "DeleteFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
src = SysAllocString(L"test3.txt");
dst = SysAllocString(L"test2.txt"); /* already exists */
hr = IFileSystem3_MoveFile(fs3, src, dst);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x, expected CTL_E_FILEALREADYEXISTS\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
src = SysAllocString(L"nonexistent.txt");
dst = SysAllocString(L"test4.txt");
hr = IFileSystem3_MoveFile(fs3, src, dst);
- ok(hr == CTL_E_FILENOTFOUND, "got 0x%08x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
str = SysAllocString(L"test3.txt");
hr = IFileSystem3_DeleteFile(fs3, str, VARIANT_TRUE);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"test2.txt");
hr = IFileSystem3_DeleteFile(fs3, str, VARIANT_TRUE);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
}
@@ -2613,17 +2614,17 @@ static void test_DoOpenPipeStream(void)
hr = pDoOpenPipeStream(piperead, ForReading, &stream_read);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
ok(!!stream_read, "Unexpected stream pointer.\n");
ret = WriteFile(pipewrite, testdata, sizeof(testdata), &written, NULL);
ok(ret, "Failed to write to the pipe.\n");
- ok(written == sizeof(testdata), "Write to anonymous pipe wrote %d bytes.\n", written);
+ ok(written == sizeof(testdata), "Write to anonymous pipe wrote %ld bytes.\n", written);
hr = ITextStream_Read(stream_read, 4, &str);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"test"), "Unexpected data read %s.\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -2644,29 +2645,29 @@ static void test_DoOpenPipeStream(void)
stream_read = NULL;
hr = pDoOpenPipeStream(piperead, ForReading, &stream_read);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream_write = NULL;
hr = pDoOpenPipeStream(pipewrite, ForWriting, &stream_write);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
str = SysAllocString(L"data");
hr = ITextStream_Write(stream_write, str);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Write(stream_read, str);
- ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#x.\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = ITextStream_Read(stream_write, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#x.\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream_read, 4, &str);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"data"), "Unexpected data.\n");
SysFreeString(str);
}
@@ -2685,8 +2686,9 @@ START_TEST(filesystem)
hr = CoCreateInstance(&CLSID_FileSystemObject, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IFileSystem3, (void**)&fs3);
- if(FAILED(hr)) {
- win_skip("Could not create FileSystem object: %08x\n", hr);
+ if(FAILED(hr))
+ {
+ win_skip("Could not create FileSystem object, hr %#lx.\n", hr);
return;
}
--
2.34.1
1
0
Feb. 11, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/wshom.ocx/tests/Makefile.in | 1 -
dlls/wshom.ocx/tests/wshom.c | 218 +++++++++++++++----------------
2 files changed, 108 insertions(+), 111 deletions(-)
diff --git a/dlls/wshom.ocx/tests/Makefile.in b/dlls/wshom.ocx/tests/Makefile.in
index 1251173ffd4..f115163aceb 100644
--- a/dlls/wshom.ocx/tests/Makefile.in
+++ b/dlls/wshom.ocx/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wshom.ocx
IMPORTS = oleaut32 ole32 advapi32
diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c
index c5e56c84aba..0e30ea9ed9a 100644
--- a/dlls/wshom.ocx/tests/wshom.c
+++ b/dlls/wshom.ocx/tests/wshom.c
@@ -28,9 +28,6 @@
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
-#define EXPECT_HR(hr,hr_exp) \
- ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
-
#define test_provideclassinfo(a, b) _test_provideclassinfo((IDispatch*)a, b, __LINE__)
static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
{
@@ -40,13 +37,13 @@ static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
HRESULT hr;
hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void **)&classinfo);
- ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#lx.\n", hr);
hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
- ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &attr);
- ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#lx.\n", hr);
ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo %s, expected %s\n", wine_dbgstr_guid(&attr->guid),
wine_dbgstr_guid(guid));
@@ -89,45 +86,45 @@ static void test_wshshell(void)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDispatch, (void**)&disp);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IWshShell3, (void**)&shell);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(disp, &IID_IWshShell3);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- EXPECT_HR(hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
IDispatch_Release(disp);
hr = IUnknown_QueryInterface(shell, &IID_IWshShell3, (void**)&sh3);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_QueryInterface(sh3, &IID_IObjectWithSite, (void**)&unk);
- ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell, (void**)&unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell2, (void**)&unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IWshShell3_get_SpecialFolders(sh3, &coll);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(coll, &IID_IWshCollection);
hr = IWshCollection_QueryInterface(coll, &IID_IFolderCollection, (void**)&folders);
- EXPECT_HR(hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IWshCollection_QueryInterface(coll, &IID_IDispatch, (void**)&disp);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_GetTypeInfo(disp, 0, 0, &ti);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &tattr);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualIID(&tattr->guid, &IID_IWshCollection), "got wrong type guid\n");
ITypeInfo_ReleaseTypeAttr(ti, tattr);
@@ -140,12 +137,12 @@ static void test_wshshell(void)
dp.cArgs = 1;
dp.cNamedArgs = 0;
hr = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 1033, DISPATCH_PROPERTYGET, &dp, &res, &ei, &err);
- EXPECT_HR(hr, DISP_E_MEMBERNOTFOUND);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "Unexpected hr %#lx.\n", hr);
/* try Item() directly, it returns directory path apparently */
V_VT(&res) = VT_EMPTY;
hr = IWshCollection_Item(coll, &arg, &res);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&res) == VT_BSTR, "got res type %d\n", V_VT(&res));
CHECK_BSTR_LENGTH(V_BSTR(&res));
SysFreeString(str);
@@ -154,54 +151,54 @@ static void test_wshshell(void)
/* CreateShortcut() */
str = SysAllocString(L"file.lnk");
hr = IWshShell3_CreateShortcut(sh3, str, &shortcut);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IDispatch_QueryInterface(shortcut, &IID_IWshShortcut, (void**)&shcut);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(shortcut, &IID_IWshShortcut);
hr = IWshShortcut_get_Arguments(shcut, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IWshShortcut_get_IconLocation(shcut, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IWshShortcut_Release(shcut);
IDispatch_Release(shortcut);
/* ExpandEnvironmentStrings */
hr = IWshShell3_ExpandEnvironmentStrings(sh3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"%PATH%");
hr = IWshShell3_ExpandEnvironmentStrings(sh3, str, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
V_VT(&arg) = VT_BSTR;
V_BSTR(&arg) = SysAllocString(L"SYSTEM");
hr = IWshShell3_get_Environment(sh3, &arg, &env);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&arg);
hr = IWshEnvironment_get_Item(env, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(env, &IID_IWshEnvironment);
ret = (BSTR)0x1;
hr = IWshEnvironment_get_Item(env, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret && !*ret, "got %p\n", ret);
SysFreeString(ret);
/* invalid var name */
str = SysAllocString(L"file.lnk");
hr = IWshEnvironment_get_Item(env, str, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = NULL;
hr = IWshEnvironment_get_Item(env, str, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret && *ret == 0, "got %s\n", wine_dbgstr_w(ret));
CHECK_BSTR_LENGTH(ret);
SysFreeString(ret);
@@ -210,7 +207,7 @@ static void test_wshshell(void)
/* valid name */
str = SysAllocString(L"PATH");
hr = IWshEnvironment_get_Item(env, str, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret && *ret != 0, "got %s\n", wine_dbgstr_w(ret));
CHECK_BSTR_LENGTH(ret);
SysFreeString(ret);
@@ -225,24 +222,24 @@ static void test_wshshell(void)
str = SysAllocString(L"notepad.exe");
hr = IWshShell3_Run(sh3, str, &arg, &arg2, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
retval = 10;
hr = IWshShell3_Run(sh3, str, NULL, &arg2, &retval);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
- ok(retval == 10, "got %u\n", retval);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
+ ok(retval == 10, "Unexpected retval %lu.\n", retval);
retval = 10;
hr = IWshShell3_Run(sh3, str, &arg, NULL, &retval);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
- ok(retval == 10, "got %u\n", retval);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
+ ok(retval == 10, "Unexpected retval %lu.\n", retval);
retval = 10;
V_VT(&arg2) = VT_ERROR;
V_ERROR(&arg2) = 0;
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hr);
- ok(retval == 10, "got %u\n", retval);
+ ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr);
+ ok(retval == 10, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
V_VT(&arg2) = VT_BOOL;
@@ -251,15 +248,15 @@ static void test_wshshell(void)
retval = 0xdeadbeef;
str = SysAllocString(L"cmd.exe /c rd /s /q c:\\nosuchdir");
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "got %u\n", retval);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
retval = 0xdeadbeef;
str = SysAllocString(L"\"cmd.exe \" /c rd /s /q c:\\nosuchdir");
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "got %u\n", retval);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
GetSystemDirectoryW(path, ARRAY_SIZE(path));
@@ -282,8 +279,8 @@ static void test_wshshell(void)
retval = 0xdeadbeef;
str = SysAllocString(buf);
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "got %u\n", retval);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
DeleteFileW(path2);
@@ -296,45 +293,45 @@ static void test_wshshell(void)
str = NULL;
hr = IWshShell3_get_CurrentDirectory(sh3, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str && str[0] != 0, "got empty string\n");
CHECK_BSTR_LENGTH(str);
SysFreeString(str);
hr = IWshShell3_put_CurrentDirectory(sh3, NULL);
ok(hr == E_INVALIDARG ||
- broken(hr == HRESULT_FROM_WIN32(ERROR_NOACCESS)), "got 0x%08x\n", hr);
+ broken(hr == HRESULT_FROM_WIN32(ERROR_NOACCESS)), "Unexpected hr %#lx.\n", hr);
str = SysAllocString(emptyW);
hr = IWshShell3_put_CurrentDirectory(sh3, str);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"deadparrot");
hr = IWshShell3_put_CurrentDirectory(sh3, str);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
/* Exec */
hr = IWshShell3_Exec(sh3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_Exec(sh3, NULL, &shexec);
- ok(hr == DISP_E_EXCEPTION, "got 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(emptyW);
hr = IWshShell3_Exec(sh3, str, &shexec);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"%deadbeaf% /c echo test");
hr = IWshShell3_Exec(sh3, str, &shexec);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"%ComSpec% /c echo test");
hr = IWshShell3_Exec(sh3, str, &shexec);
- ok(hr == HRESULT_FROM_WIN32(ERROR_SUCCESS), "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
IWshCollection_Release(coll);
@@ -380,49 +377,49 @@ static void test_registry(void)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IWshShell3, (void**)&sh3);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* RegRead() */
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, NULL, &value);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
name = SysAllocString(L"HKEY_broken_key");
hr = IWshShell3_RegRead(sh3, name, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
SysFreeString(name);
name = SysAllocString(L"HKEY_CURRENT_USERa");
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
SysFreeString(name);
ret = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &root);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
ret = RegSetValueExA(root, "regsz", 0, REG_SZ, (const BYTE*)"foobar", 7);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
ret = RegSetValueExA(root, "regsz2", 0, REG_SZ, (const BYTE*)"foobar\0f", 9);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
ret = RegSetValueExA(root, "regmultisz", 0, REG_MULTI_SZ, (const BYTE*)"foo\0bar\0", 9);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
dwvalue = 10;
ret = RegSetValueExA(root, "regdword", 0, REG_DWORD, (const BYTE*)&dwvalue, sizeof(dwvalue));
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
dwvalue = 11;
ret = RegSetValueExA(root, "regbinary", 0, REG_BINARY, (const BYTE*)&dwvalue, sizeof(dwvalue));
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
/* REG_SZ */
lstrcpyW(pathW, keypathW);
@@ -430,7 +427,7 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_BSTR, "got %d\n", V_VT(&value));
ok(!lstrcmpW(V_BSTR(&value), L"foobar"), "got %s\n", wine_dbgstr_w(V_BSTR(&value)));
CHECK_BSTR_LENGTH(V_BSTR(&value));
@@ -443,7 +440,7 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_BSTR, "got %d\n", V_VT(&value));
ok(SysStringLen(V_BSTR(&value)) == 6, "len %d\n", SysStringLen(V_BSTR(&value)));
CHECK_BSTR_LENGTH(V_BSTR(&value));
@@ -456,9 +453,9 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I4, "got %d\n", V_VT(&value));
- ok(V_I4(&value) == 10, "got %d\n", V_I4(&value));
+ ok(V_I4(&value) == 10, "Unexpected value %ld.\n", V_I4(&value));
SysFreeString(name);
/* REG_BINARY */
@@ -467,26 +464,26 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == (VT_ARRAY|VT_VARIANT), "got 0x%x\n", V_VT(&value));
dim = SafeArrayGetDim(V_ARRAY(&value));
ok(dim == 1, "got %u\n", dim);
hr = SafeArrayGetLBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 0, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 0, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetUBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 3, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 3, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetVartype(V_ARRAY(&value), &vartype);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(vartype == VT_VARIANT, "got %d\n", vartype);
bound = 0;
hr = SafeArrayGetElement(V_ARRAY(&value), &bound, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&v) == VT_UI1, "got %d\n", V_VT(&v));
ok(V_UI1(&v) == 11, "got %u\n", V_UI1(&v));
VariantClear(&v);
@@ -499,7 +496,7 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == (VT_ARRAY|VT_VARIANT), "got 0x%x\n", V_VT(&value));
SysFreeString(name);
@@ -507,20 +504,20 @@ static void test_registry(void)
ok(dim == 1, "got %u\n", dim);
hr = SafeArrayGetLBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 0, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 0, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetUBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 1, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 1, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetVartype(V_ARRAY(&value), &vartype);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(vartype == VT_VARIANT, "got %d\n", vartype);
bound = 0;
hr = SafeArrayGetElement(V_ARRAY(&value), &bound, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&v) == VT_BSTR, "got %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"foo"), "got %s\n", wine_dbgstr_w(V_BSTR(&v)));
CHECK_BSTR_LENGTH(V_BSTR(&v));
@@ -530,7 +527,7 @@ static void test_registry(void)
name = SysAllocString(L"HKEY_CURRENT_USER\\Software\\Wine\\Test\\regsz1");
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
VariantClear(&value);
SysFreeString(name);
@@ -539,76 +536,76 @@ static void test_registry(void)
/* RegWrite() */
ret = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &root);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
hr = IWshShell3_RegWrite(sh3, NULL, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
lstrcpyW(pathW, keypathW);
lstrcatW(pathW, regszW);
name = SysAllocString(pathW);
hr = IWshShell3_RegWrite(sh3, name, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
VariantInit(&value);
hr = IWshShell3_RegWrite(sh3, name, &value, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_RegWrite(sh3, name, &value, &value);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* type is optional */
V_VT(&v) = VT_ERROR;
V_ERROR(&v) = DISP_E_PARAMNOTFOUND;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* default type is REG_SZ */
V_VT(&value) = VT_I4;
V_I4(&value) = 12;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = REG_NONE;
ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
- ok(type == REG_SZ, "got %d\n", type);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
+ ok(type == REG_SZ, "Unexpected type %ld.\n", type);
ret = RegDeleteValueA(root, "regsz");
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
V_VT(&value) = VT_BSTR;
V_BSTR(&value) = SysAllocString(regszW);
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
type = REG_NONE;
ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
- ok(type == REG_SZ, "got %d\n", type);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
+ ok(type == REG_SZ, "Unexpected type %ld.\n", type);
ret = RegDeleteValueA(root, "regsz");
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
V_VT(&value) = VT_R4;
V_R4(&value) = 1.2;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
type = REG_NONE;
ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
- ok(type == REG_SZ, "got %d\n", type);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
+ ok(type == REG_SZ, "Unexpected type %ld.\n", type);
ret = RegDeleteValueA(root, "regsz");
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
V_VT(&value) = VT_R4;
V_R4(&value) = 1.2;
V_VT(&v) = VT_I2;
V_I2(&v) = 1;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
SysFreeString(name);
@@ -627,17 +624,17 @@ static void test_popup(void)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
&IID_IWshShell, (void **)&sh);
- ok(hr == S_OK, "Failed to create WshShell object, hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
button = 123;
text = SysAllocString(L"Text");
hr = IWshShell_Popup(sh, NULL, NULL, NULL, NULL, &button);
- ok(hr == E_POINTER, "Unexpected retval %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(button == 123, "Unexpected button id %d.\n", button);
hr = IWshShell_Popup(sh, text, NULL, NULL, NULL, &button);
- ok(hr == E_POINTER, "Unexpected retval %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(button == 123, "Unexpected button id %d.\n", button);
V_VT(&optional) = VT_ERROR;
@@ -653,11 +650,11 @@ static void test_popup(void)
V_BSTR(&title) = NULL;
hr = IWshShell_Popup(sh, text, &timeout, &optional, &type, &button);
- ok(hr == S_OK, "Unexpected retval %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(button == -1, "Unexpected button id %d.\n", button);
hr = IWshShell_Popup(sh, text, &timeout, &title, &optional, &button);
- ok(hr == S_OK, "Unexpected retval %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(button == -1, "Unexpected button id %d.\n", button);
SysFreeString(text);
@@ -673,8 +670,9 @@ START_TEST(wshom)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IUnknown, (void**)&unk);
- if (FAILED(hr)) {
- win_skip("Could not create WshShell object: %08x\n", hr);
+ if (FAILED(hr))
+ {
+ win_skip("Could not create WshShell object: %#lx.\n", hr);
return;
}
IUnknown_Release(unk);
--
2.34.1
1
0
[PATCH] xaudio2_7/tests: Build without -DWINE_NO_LONG_TYPES.
by Alistair Leslie-Hughes Feb. 11, 2022
by Alistair Leslie-Hughes Feb. 11, 2022
Feb. 11, 2022
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/xaudio2_7/tests/Makefile.in | 1 -
dlls/xaudio2_7/tests/xaudio2.c | 182 +++++++++++++++----------------
2 files changed, 91 insertions(+), 92 deletions(-)
diff --git a/dlls/xaudio2_7/tests/Makefile.in b/dlls/xaudio2_7/tests/Makefile.in
index e44130a1d7a..ba56d94a1f3 100644
--- a/dlls/xaudio2_7/tests/Makefile.in
+++ b/dlls/xaudio2_7/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = xaudio2_7.dll
IMPORTS = ole32
diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c
index 9821553166e..9d50944b8d3 100644
--- a/dlls/xaudio2_7/tests/xaudio2.c
+++ b/dlls/xaudio2_7/tests/xaudio2.c
@@ -192,18 +192,18 @@ static void test_simple_streaming(IXAudio2 *xa)
* XA2.7 does all mixing from a single thread, so call sequence can be
* tested. */
XA2CALL(RegisterForCallbacks, &ecb);
- ok(hr == S_OK, "RegisterForCallbacks failed: %08x\n", hr);
+ ok(hr == S_OK, "RegisterForCallbacks failed: %08lx\n", hr);
if(xaudio27)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
if(!xaudio27){
chmask = 0xdeadbeef;
IXAudio2MasteringVoice_GetChannelMask(master, &chmask);
- ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%x\n", chmask);
+ ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%lx\n", chmask);
}
/* create first source voice */
@@ -216,7 +216,7 @@ static void test_simple_streaming(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &vcb1, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
if(xaudio27){
XAUDIO27_VOICE_DETAILS details;
@@ -239,14 +239,14 @@ static void test_simple_streaming(IXAudio2 *xa)
fill_buf((float*)buf.pAudioData, &fmt, 440, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
/* create second source voice */
XA2CALL(CreateSourceVoice, &src2, &fmt, 0, 1.f, &vcb2, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
if(xaudio27){
XAUDIO27_VOICE_DETAILS details;
@@ -269,13 +269,13 @@ static void test_simple_streaming(IXAudio2 *xa)
fill_buf((float*)buf2.pAudioData, &fmt, 220, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src2, &buf2, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src2, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
/* hook up volume meter */
if(xaudio27){
@@ -283,20 +283,20 @@ static void test_simple_streaming(IXAudio2 *xa)
hr = CoCreateInstance(&CLSID_AudioVolumeMeter27, NULL,
CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&vumeter);
- ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
}else{
IXAPO *xapo;
hr = pCreateAudioVolumeMeter(&vumeter);
- ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
}
@@ -309,7 +309,7 @@ static void test_simple_streaming(IXAudio2 *xa)
chain.pEffectDescriptors = &effect;
hr = IXAudio2MasteringVoice_SetEffectChain(master, &chain);
- ok(hr == S_OK, "SetEffectchain failed: %08x\n", hr);
+ ok(hr == S_OK, "SetEffectchain failed: %08lx\n", hr);
IUnknown_Release(vumeter);
@@ -488,7 +488,7 @@ static void test_buffer_callbacks(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
/* test OnBufferStart/End callbacks */
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
@@ -500,7 +500,7 @@ static void test_buffer_callbacks(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &vcb_buf, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
buf.AudioBytes = 4410 * fmt.nBlockAlign;
@@ -514,22 +514,22 @@ static void test_buffer_callbacks(IXAudio2 *xa)
buf.pContext = &testdata[i];
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
}
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
if(xaudio27){
hr = IXAudio27SourceVoice_SetSourceSampleRate((IXAudio27SourceVoice*)src, 48000);
- ok(hr == S_OK, "SetSourceSampleRate failed: %08x\n", hr);
+ ok(hr == S_OK, "SetSourceSampleRate failed: %08lx\n", hr);
}else{
hr = IXAudio2SourceVoice_SetSourceSampleRate(src, 48000);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetSourceSampleRate should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetSourceSampleRate should have failed: %08lx\n", hr);
}
while(1){
@@ -552,15 +552,15 @@ static void test_buffer_callbacks(IXAudio2 *xa)
/* test OnStreamEnd callback */
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &loop_buf, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
buf.Flags = XAUDIO2_END_OF_STREAM;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
timeout = 0;
while(nstreamends == 0 && timeout < 1000){
@@ -596,7 +596,7 @@ static UINT32 play_to_completion(IXAudio2SourceVoice *src, UINT32 max_samples)
nloopends = 0;
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
while(1){
if(xaudio27)
@@ -615,7 +615,7 @@ static UINT32 play_to_completion(IXAudio2SourceVoice *src, UINT32 max_samples)
}
hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
return state.SamplesPlayed;
}
@@ -635,7 +635,7 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
@@ -647,7 +647,7 @@ static void test_looping(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &loop_buf, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
@@ -656,7 +656,7 @@ static void test_looping(IXAudio2 *xa)
fill_buf((float*)buf.pAudioData, &fmt, 440, 44100);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
/* play from middle to end */
buf.PlayBegin = 22050;
@@ -666,7 +666,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 0;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 22050, "Got wrong samples played: %u\n", played - running_total);
@@ -681,7 +681,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 0;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 4410, "Got wrong samples played: %u\n", played - running_total);
@@ -696,7 +696,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 44100 + 4410, "Got wrong samples played: %u\n", played - running_total);
@@ -711,7 +711,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 22050 + 44100, "Got wrong samples played: %u\n", played - running_total);
@@ -726,7 +726,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 4410 + (22050 + 4410), "Got wrong samples played: %u\n", played - running_total);
@@ -743,14 +743,14 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
if(xaudio27){
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 4410 + (22050 + 4410 * 2), "Got wrong samples played: %u\n", played - running_total);
running_total = played;
ok(nloopends == 1, "Got wrong OnLoopEnd calls: %u\n", nloopends);
}else
- ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
/* invalid: LoopEnd must be within play range
* xaudio27: plays only play range */
@@ -762,14 +762,14 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
if(xaudio27){
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 22050, "Got wrong samples played: %u\n", played - running_total);
running_total = played;
ok(nloopends == 0, "Got wrong OnLoopEnd calls: %u\n", nloopends);
}else
- ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
/* invalid: LoopBegin must be before PlayEnd
* xaudio27: crashes */
@@ -781,7 +781,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
}
/* infinite looping buffer */
@@ -792,7 +792,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 255;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, running_total + 88200);
ok(played - running_total == 22050 + 44100 * 2, "Got wrong samples played: %u\n", played - running_total);
@@ -819,10 +819,10 @@ static void test_submix(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
XA2CALL(CreateSubmixVoice, &sub, 2, 44100, 0, 0, NULL, NULL);
- ok(hr == S_OK, "CreateSubmixVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
if(xaudio27){
XAUDIO27_VOICE_DETAILS details;
@@ -858,7 +858,7 @@ static void test_flush(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
fmt.nChannels = 2;
@@ -869,7 +869,7 @@ static void test_flush(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
buf.AudioBytes = 22050 * fmt.nBlockAlign;
@@ -877,13 +877,13 @@ static void test_flush(IXAudio2 *xa)
fill_buf((float*)buf.pAudioData, &fmt, 440, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
while(1){
if(xaudio27)
@@ -896,18 +896,18 @@ static void test_flush(IXAudio2 *xa)
}
hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Stop failed: %08x\n", hr);
+ ok(hr == S_OK, "Stop failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_FlushSourceBuffers(src);
- ok(hr == S_OK, "FlushSourceBuffers failed: %08x\n", hr);
+ ok(hr == S_OK, "FlushSourceBuffers failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
Sleep(100);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
if(xaudio27){
IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src);
@@ -926,14 +926,14 @@ static UINT32 test_DeviceDetails(IXAudio27 *xa)
UINT32 count, i;
hr = IXAudio27_GetDeviceCount(xa, &count);
- ok(hr == S_OK, "GetDeviceCount failed: %08x\n", hr);
+ ok(hr == S_OK, "GetDeviceCount failed: %08lx\n", hr);
if(count == 0)
return 0;
for(i = 0; i < count; ++i){
hr = IXAudio27_GetDeviceDetails(xa, i, &dd);
- ok(hr == S_OK, "GetDeviceDetails failed: %08x\n", hr);
+ ok(hr == S_OK, "GetDeviceDetails failed: %08lx\n", hr);
if(i == 0)
ok(dd.Role == GlobalDefaultDevice, "Got wrong role for index 0: 0x%x\n", dd.Role);
@@ -1008,46 +1008,46 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){
hr = pCreateFX(const_clsids[i], &fx_unk);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %lu\n", rc);
}
hr = CoCreateInstance(const_clsids[i], NULL, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&fx_unk);
- ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08lx\n", hr);
if(SUCCEEDED(hr))
IUnknown_Release(fx_unk);
}
hr = pCreateFX(avm_clsids[version - 20], &fx_unk);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "AudioVolumeMeter via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "AudioVolumeMeter via CreateFX should have been released, got refcount: %lu\n", rc);
}
hr = pCreateFX(ar_clsids[version - 20], &fx_unk);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "AudioReverb via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "AudioReverb via CreateFX should have been released, got refcount: %lu\n", rc);
}
FreeLibrary(xapofxdll);
@@ -1093,65 +1093,65 @@ static void test_xapo_creation_modern(const char *module)
for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){
hr = pCreateFX(const_clsids[i], &fx_unk, NULL, 0);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %lu\n", rc);
}
hr = CoCreateInstance(const_clsids[i], NULL, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&fx_unk);
- ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08lx\n", hr);
if(SUCCEEDED(hr))
IUnknown_Release(fx_unk);
}
/* test legacy CLSID */
hr = pCreateFX(&CLSID_AudioVolumeMeter27, &fx_unk, NULL, 0);
- ok(hr == S_OK, "%s: CreateFX(CLSID_AudioVolumeMeter) failed: %08x\n", module, hr);
+ ok(hr == S_OK, "%s: CreateFX(CLSID_AudioVolumeMeter) failed: %08lx\n", module, hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via legacy CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via legacy CreateFX should have been released, got refcount: %lu\n", rc);
}
pCAVM = (void*)GetProcAddress(xaudio2dll, "CreateAudioVolumeMeter");
ok(pCAVM != NULL, "%s did not have CreateAudioVolumeMeter?\n", module);
hr = pCAVM(&fx_unk);
- ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08lx\n", hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateAudioVolumeMeter should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateAudioVolumeMeter should have been released, got refcount: %lu\n", rc);
}
pCAR = (void*)GetProcAddress(xaudio2dll, "CreateAudioReverb");
ok(pCAR != NULL, "%s did not have CreateAudioReverb?\n", module);
hr = pCAR(&fx_unk);
- ok(hr == S_OK, "CreateAudioReverb failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateAudioReverb failed: %08lx\n", hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateAudioReverb should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateAudioReverb should have been released, got refcount: %lu\n", rc);
}
FreeLibrary(xaudio2dll);
@@ -1180,7 +1180,7 @@ static void test_setchannelvolumes(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 8, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 8, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt_2ch.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
fmt_2ch.nChannels = 2;
@@ -1199,32 +1199,32 @@ static void test_setchannelvolumes(IXAudio2 *xa)
fmt_8ch.cbSize = 0;
XA2CALL(CreateSourceVoice, &src_2ch, &fmt_2ch, 0, 1.f, NULL, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
XA2CALL(CreateSourceVoice, &src_8ch, &fmt_8ch, 0, 1.f, NULL, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 2, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr);
+ ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 8, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr);
+ ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
if(xaudio27){
/* XAudio 2.7 doesn't check the number of channels */
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 2, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr);
+ ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
}else{
/* the number of channels must be the same as the number of channels on the source voice */
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 2, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 8, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
/* volumes must not be NULL, XAudio 2.7 doesn't check this */
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 2, NULL, XAUDIO2_COMMIT_NOW);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
}
if(xaudio27){
@@ -1281,7 +1281,7 @@ START_TEST(xaudio2)
ok(hr != S_OK, "QueryInterface with IID_IXAudio28 on IXAudio27 object returned success. Expected to fail\n");
hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR);
- ok(hr == S_OK, "Initialize failed: %08x\n", hr);
+ ok(hr == S_OK, "Initialize failed: %08lx\n", hr);
has_devices = test_DeviceDetails(xa27);
if(has_devices){
@@ -1295,7 +1295,7 @@ START_TEST(xaudio2)
skip("No audio devices available\n");
rc = IXAudio27_Release(xa27);
- ok(rc == 0, "IXAudio2.7 object should have been released, got refcount %u\n", rc);
+ ok(rc == 0, "IXAudio2.7 object should have been released, got refcount %lu\n", rc);
}else
win_skip("XAudio 2.7 not available\n");
@@ -1304,10 +1304,10 @@ START_TEST(xaudio2)
xaudio27 = FALSE;
hr = pXAudio2Create(&xa, 0, XAUDIO2_DEFAULT_PROCESSOR);
- ok(hr == S_OK, "XAudio2Create failed: %08x\n", hr);
+ ok(hr == S_OK, "XAudio2Create failed: %08lx\n", hr);
hr = IXAudio2_QueryInterface(xa, &IID_IXAudio27, (void**)&xa27);
- ok(hr == E_NOINTERFACE, "XA28 object should support IXAudio27, gave: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "XA28 object should support IXAudio27, gave: %08lx\n", hr);
has_devices = check_has_devices(xa);
if(has_devices){
@@ -1321,7 +1321,7 @@ START_TEST(xaudio2)
skip("No audio devices available\n");
rc = IXAudio2_Release(xa);
- ok(rc == 0, "IXAudio2 object should have been released, got refcount %u\n", rc);
+ ok(rc == 0, "IXAudio2 object should have been released, got refcount %lu\n", rc);
}else
win_skip("XAudio 2.8 not available\n");
--
2.34.1
1
0
Feb. 11, 2022
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/wow64/Makefile.in | 1 -
dlls/wow64/process.c | 6 +++---
dlls/wow64/registry.c | 2 +-
dlls/wow64/security.c | 4 ++--
dlls/wow64/sync.c | 2 +-
dlls/wow64/syscall.c | 10 +++++-----
dlls/wow64/system.c | 2 +-
dlls/wow64/virtual.c | 4 ++--
8 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/wow64/Makefile.in b/dlls/wow64/Makefile.in
index 6b161b5cc3e..eebf9e8e53a 100644
--- a/dlls/wow64/Makefile.in
+++ b/dlls/wow64/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wow64.dll
IMPORTLIB = wow64
IMPORTS = ntdll winecrt0
diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c
index 52f6b952031..82ca4181116 100644
--- a/dlls/wow64/process.c
+++ b/dlls/wow64/process.c
@@ -365,7 +365,7 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32
ctx.EFlags &= ~(0x100|0x400|0x40000);
NtSetInformationThread( GetCurrentThread(), ThreadWow64Context, &ctx, sizeof(ctx) );
- TRACE( "exception %08x dispatcher %08x stack %08x eip %08x\n",
+ TRACE( "exception %08lx dispatcher %08lx stack %08lx eip %08lx\n",
rec->ExceptionCode, ctx.Eip, ctx.Esp, stack->context.Eip );
}
break;
@@ -392,7 +392,7 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32
else ctx.Cpsr &= ~0x20;
NtSetInformationThread( GetCurrentThread(), ThreadWow64Context, &ctx, sizeof(ctx) );
- TRACE( "exception %08x dispatcher %08x stack %08x pc %08x\n",
+ TRACE( "exception %08lx dispatcher %08lx stack %08lx pc %08lx\n",
rec->ExceptionCode, ctx.Pc, ctx.Sp, stack->context.Sp );
}
break;
@@ -516,7 +516,7 @@ NTSTATUS WINAPI wow64_NtCreateThread( UINT *args )
void *initial_teb = get_ptr( &args );
BOOLEAN suspended = get_ulong( &args );
- FIXME( "%p %x %p %p %p %p %p %u: stub\n", handle_ptr, access, attr32, process,
+ FIXME( "%p %lx %p %p %p %p %p %u: stub\n", handle_ptr, access, attr32, process,
id32, context, initial_teb, suspended );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c
index e89c65c4c5e..dfb75d72bc7 100644
--- a/dlls/wow64/registry.c
+++ b/dlls/wow64/registry.c
@@ -349,7 +349,7 @@ NTSTATUS WINAPI wow64_NtQueryMultipleValueKey( UINT *args )
ULONG len = get_ulong( &args );
ULONG *retlen = get_ptr( &args );
- FIXME( "%p %p %u %p %u %p: stub\n", handle, info, count, ptr, len, retlen );
+ FIXME( "%p %p %lu %p %lu %p: stub\n", handle, info, count, ptr, len, retlen );
return STATUS_SUCCESS;
}
diff --git a/dlls/wow64/security.c b/dlls/wow64/security.c
index 1c8f82d9a3a..680f5a6ec56 100644
--- a/dlls/wow64/security.c
+++ b/dlls/wow64/security.c
@@ -110,7 +110,7 @@ NTSTATUS WINAPI wow64_NtAdjustGroupsToken( UINT *args )
TOKEN_GROUPS32 *prev = get_ptr( &args );
ULONG *retlen = get_ptr( &args );
- FIXME( "%p %d %p %u %p %p\n", handle, reset, groups, len, prev, retlen );
+ FIXME( "%p %d %p %lu %p %p\n", handle, reset, groups, len, prev, retlen );
return STATUS_NOT_IMPLEMENTED;
}
@@ -146,7 +146,7 @@ NTSTATUS WINAPI wow64_NtCreateLowBoxToken( UINT *args )
ULONG handle_count = get_ulong( &args );
ULONG *handles32 = get_ptr( &args );
- FIXME( "%p %p %x %p %p %u %p %u %p: stub\n",
+ FIXME( "%p %p %lx %p %p %lu %p %lu %p: stub\n",
handle_ptr, token, access, attr32, sid, count, capabilities32, handle_count, handles32 );
*handle_ptr = 0;
diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c
index b8f3fabe06c..d4122ddf3f3 100644
--- a/dlls/wow64/sync.c
+++ b/dlls/wow64/sync.c
@@ -141,7 +141,7 @@ NTSTATUS WINAPI wow64_NtAcceptConnectPort( UINT *args )
LPC_SECTION_WRITE *write = get_ptr( &args );
LPC_SECTION_READ *read = get_ptr( &args );
- FIXME( "%p %u %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read );
+ FIXME( "%p %lu %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c
index 42e852f4d28..7cab0894738 100644
--- a/dlls/wow64/syscall.c
+++ b/dlls/wow64/syscall.c
@@ -455,9 +455,9 @@ static void init_syscall_table( HMODULE module, ULONG idx, const SYSTEM_SERVICE_
thunks[start_pos + table_pos] = (syscall_thunk)orig_table->ServiceTable[wrap_pos++];
max_pos = max( table_pos, max_pos );
}
- else ERR( "invalid syscall id %04x for %s\n", id, name );
+ else ERR( "invalid syscall id %04lx for %s\n", id, name );
}
- else ERR( "wrong syscall table id %04x for %s\n", id, name );
+ else ERR( "wrong syscall table id %04lx for %s\n", id, name );
}
else if (res > 0)
{
@@ -465,7 +465,7 @@ static void init_syscall_table( HMODULE module, ULONG idx, const SYSTEM_SERVICE_
wrap_pos++;
exp_pos--; /* try again */
}
- else FIXME( "missing wrapper for syscall %04x %s\n", id, name );
+ else FIXME( "missing wrapper for syscall %04lx %s\n", id, name );
}
for ( ; wrap_pos < orig_table->ServiceLimit; wrap_pos++)
@@ -492,7 +492,7 @@ static HMODULE load_64bit_module( const WCHAR *name )
RtlInitUnicodeString( &str, path );
if ((status = LdrLoadDll( NULL, 0, &str, &module )))
{
- ERR( "failed to load dll %x\n", status );
+ ERR( "failed to load dll %lx\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
}
return module;
@@ -535,7 +535,7 @@ static HMODULE load_32bit_module( const WCHAR *name )
if (!status) return module;
failed:
- ERR( "failed to load dll %x\n", status );
+ ERR( "failed to load dll %lx\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
return NULL;
}
diff --git a/dlls/wow64/system.c b/dlls/wow64/system.c
index 092319cba84..0727bc25bbe 100644
--- a/dlls/wow64/system.c
+++ b/dlls/wow64/system.c
@@ -686,7 +686,7 @@ NTSTATUS WINAPI wow64_NtRaiseHardError( UINT *args )
HARDERROR_RESPONSE_OPTION option = get_ulong( &args );
HARDERROR_RESPONSE *response = get_ptr( &args );
- FIXME( "%08x %u %x %p %u %p: stub\n", status, count, params_mask, params, option, response );
+ FIXME( "%08lx %lu %lx %p %u %p: stub\n", status, count, params_mask, params, option, response );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/virtual.c b/dlls/wow64/virtual.c
index f4cd50d0ea2..fc470c07923 100644
--- a/dlls/wow64/virtual.c
+++ b/dlls/wow64/virtual.c
@@ -77,7 +77,7 @@ NTSTATUS WINAPI wow64_NtAllocateVirtualMemoryEx( UINT *args )
SIZE_T size;
NTSTATUS status;
- if (count) FIXME( "%d extended parameters %p\n", count, params );
+ if (count) FIXME( "%ld extended parameters %p\n", count, params );
status = NtAllocateVirtualMemoryEx( process, addr_32to64( &addr, addr32 ), size_32to64( &size, size32 ),
type, protect, params, count );
if (!status)
@@ -430,7 +430,7 @@ NTSTATUS WINAPI wow64_NtSetLdtEntries( UINT *args )
ULONG entry2_low = get_ulong( &args );
ULONG entry2_high = get_ulong( &args );
- FIXME( "%04x %08x %08x %04x %08x %08x: stub\n",
+ FIXME( "%04lx %08lx %08lx %04lx %08lx %08lx: stub\n",
sel1, entry1_low, entry1_high, sel2, entry2_low, entry2_high );
return STATUS_NOT_IMPLEMENTED;
}
--
2.34.1
1
0