Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/Makefile.in | 1 - dlls/opcservices/compress.c | 3 ++- dlls/opcservices/factory.c | 31 +++++++++++------------ dlls/opcservices/package.c | 48 ++++++++++++++++++------------------ dlls/opcservices/uri.c | 20 +++++++-------- 5 files changed, 51 insertions(+), 52 deletions(-)
diff --git a/dlls/opcservices/Makefile.in b/dlls/opcservices/Makefile.in index 99145d4cc7e..0867b1bd882 100644 --- a/dlls/opcservices/Makefile.in +++ b/dlls/opcservices/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = opcservices.dll IMPORTS = $(ZLIB_PE_LIBS) uuid ole32 advapi32 urlmon xmllite oleaut32 EXTRAINCL = $(ZLIB_PE_CFLAGS) diff --git a/dlls/opcservices/compress.c b/dlls/opcservices/compress.c index e3a1a9db71a..cb4fabcc477 100644 --- a/dlls/opcservices/compress.c +++ b/dlls/opcservices/compress.c @@ -152,7 +152,8 @@ static void compress_write(struct zip_archive *archive, void *data, ULONG size) archive->position += written;
if (FAILED(archive->write_result)) - WARN("Failed to write output %p, size %u, written %u, hr %#x.\n", data, size, written, archive->write_result); + WARN("Failed to write output %p, size %lu, written %lu, hr %#lx.\n", + data, size, written, archive->write_result); }
void compress_finalize_archive(struct zip_archive *archive) diff --git a/dlls/opcservices/factory.c b/dlls/opcservices/factory.c index eb0455828f3..4c465f653f8 100644 --- a/dlls/opcservices/factory.c +++ b/dlls/opcservices/factory.c @@ -70,7 +70,7 @@ static ULONG WINAPI opc_filestream_AddRef(IStream *iface) struct opc_filestream *stream = impl_from_IStream(iface); ULONG refcount = InterlockedIncrement(&stream->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -80,7 +80,7 @@ static ULONG WINAPI opc_filestream_Release(IStream *iface) struct opc_filestream *stream = impl_from_IStream(iface); ULONG refcount = InterlockedDecrement(&stream->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -96,7 +96,7 @@ static HRESULT WINAPI opc_filestream_Read(IStream *iface, void *buff, ULONG size struct opc_filestream *stream = impl_from_IStream(iface); DWORD read = 0;
- TRACE("iface %p, buff %p, size %u, num_read %p.\n", iface, buff, size, num_read); + TRACE("%p, %p, %lu, %p.\n", iface, buff, size, num_read);
if (!num_read) num_read = &read; @@ -104,7 +104,7 @@ static HRESULT WINAPI opc_filestream_Read(IStream *iface, void *buff, ULONG size *num_read = 0; if (!ReadFile(stream->hfile, buff, size, num_read, NULL)) { - WARN("Failed to read file, error %d.\n", GetLastError()); + WARN("Failed to read file, error %ld.\n", GetLastError()); return HRESULT_FROM_WIN32(GetLastError()); }
@@ -116,7 +116,7 @@ static HRESULT WINAPI opc_filestream_Write(IStream *iface, const void *data, ULO struct opc_filestream *stream = impl_from_IStream(iface); DWORD written = 0;
- TRACE("iface %p, data %p, size %u, num_written %p.\n", iface, data, size, num_written); + TRACE("%p, %p, %lu, %p.\n", iface, data, size, num_written);
if (!num_written) num_written = &written; @@ -124,7 +124,7 @@ static HRESULT WINAPI opc_filestream_Write(IStream *iface, const void *data, ULO *num_written = 0; if (!WriteFile(stream->hfile, data, size, num_written, NULL)) { - WARN("Failed to write to file, error %d.\n", GetLastError()); + WARN("Failed to write to file, error %ld.\n", GetLastError()); return HRESULT_FROM_WIN32(GetLastError()); }
@@ -135,7 +135,7 @@ static HRESULT WINAPI opc_filestream_Seek(IStream *iface, LARGE_INTEGER move, DW { struct opc_filestream *stream = impl_from_IStream(iface);
- TRACE("iface %p, move %s, origin %d, newpos %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, newpos); + TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, newpos);
if (!SetFilePointerEx(stream->hfile, move, (LARGE_INTEGER *)newpos, origin)) return HRESULT_FROM_WIN32(GetLastError()); @@ -161,7 +161,7 @@ static HRESULT WINAPI opc_filestream_CopyTo(IStream *iface, IStream *dest, ULARG
static HRESULT WINAPI opc_filestream_Commit(IStream *iface, DWORD flags) { - FIXME("iface %p, flags %#x stub!\n", iface, flags); + FIXME("%p, %#lx stub!\n", iface, flags);
return E_NOTIMPL; } @@ -176,7 +176,7 @@ static HRESULT WINAPI opc_filestream_Revert(IStream *iface) static HRESULT WINAPI opc_filestream_LockRegion(IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER size, DWORD lock_type) { - FIXME("iface %p, offset %s, size %s, lock_type %d stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), + FIXME("%p, %s, %s, %ld stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), wine_dbgstr_longlong(size.QuadPart), lock_type);
return E_NOTIMPL; @@ -185,7 +185,7 @@ static HRESULT WINAPI opc_filestream_LockRegion(IStream *iface, ULARGE_INTEGER o static HRESULT WINAPI opc_filestream_UnlockRegion(IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER size, DWORD lock_type) { - FIXME("iface %p, offset %s, size %s, lock_type %d stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), + FIXME("%p, %s, %s, %ld stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), wine_dbgstr_longlong(size.QuadPart), lock_type);
return E_NOTIMPL; @@ -196,7 +196,7 @@ static HRESULT WINAPI opc_filestream_Stat(IStream *iface, STATSTG *statstg, DWOR struct opc_filestream *stream = impl_from_IStream(iface); BY_HANDLE_FILE_INFORMATION fi;
- TRACE("iface %p, statstg %p, flag %d.\n", iface, statstg, flag); + TRACE("%p, %p, %#lx.\n", iface, statstg, flag);
if (!statstg) return E_POINTER; @@ -332,13 +332,13 @@ static HRESULT WINAPI opc_factory_CreatePartUri(IOpcFactory *iface, LPCWSTR uri,
if (FAILED(hr = CreateUri(uri, Uri_CREATE_ALLOW_RELATIVE, 0, &part_uri))) { - WARN("Failed to create uri, hr %#x.\n", hr); + WARN("Failed to create uri, hr %#lx.\n", hr); return hr; }
if (FAILED(hr = CreateUri(L"/", Uri_CREATE_ALLOW_RELATIVE, 0, &root_uri))) { - WARN("Failed to create root uri, hr %#x.\n", hr); + WARN("Failed to create root uri, hr %#lx.\n", hr); IUri_Release(part_uri); return hr; } @@ -348,7 +348,7 @@ static HRESULT WINAPI opc_factory_CreatePartUri(IOpcFactory *iface, LPCWSTR uri, IUri_Release(part_uri); if (FAILED(hr)) { - WARN("Failed to combine URIs, hr %#x.\n", hr); + WARN("Failed to combine URIs, hr %#lx.\n", hr); return hr; }
@@ -360,8 +360,7 @@ static HRESULT WINAPI opc_factory_CreatePartUri(IOpcFactory *iface, LPCWSTR uri, static HRESULT WINAPI opc_factory_CreateStreamOnFile(IOpcFactory *iface, LPCWSTR filename, OPC_STREAM_IO_MODE io_mode, SECURITY_ATTRIBUTES *sa, DWORD flags, IStream **stream) { - TRACE("iface %p, filename %s, io_mode %d, sa %p, flags %#x, stream %p.\n", iface, debugstr_w(filename), - io_mode, sa, flags, stream); + TRACE("%p, %s, %d, %p, %#lx, %p.\n", iface, debugstr_w(filename), io_mode, sa, flags, stream);
return opc_filestream_create(filename, io_mode, sa, flags, stream); } diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c index df1a71e17e8..64d34d4b853 100644 --- a/dlls/opcservices/package.c +++ b/dlls/opcservices/package.c @@ -199,7 +199,7 @@ static ULONG WINAPI opc_part_enum_AddRef(IOpcPartEnumerator *iface) struct opc_part_enum *part_enum = impl_from_IOpcPartEnumerator(iface); ULONG refcount = InterlockedIncrement(&part_enum->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -209,7 +209,7 @@ static ULONG WINAPI opc_part_enum_Release(IOpcPartEnumerator *iface) struct opc_part_enum *part_enum = impl_from_IOpcPartEnumerator(iface); ULONG refcount = InterlockedDecrement(&part_enum->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -360,7 +360,7 @@ static ULONG WINAPI opc_rel_enum_AddRef(IOpcRelationshipEnumerator *iface) struct opc_rel_enum *rel_enum = impl_from_IOpcRelationshipEnumerator(iface); ULONG refcount = InterlockedIncrement(&rel_enum->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -370,7 +370,7 @@ static ULONG WINAPI opc_rel_enum_Release(IOpcRelationshipEnumerator *iface) struct opc_rel_enum *rel_enum = impl_from_IOpcRelationshipEnumerator(iface); ULONG refcount = InterlockedDecrement(&rel_enum->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -520,7 +520,7 @@ static ULONG WINAPI opc_content_stream_AddRef(IStream *iface) struct opc_content_stream *stream = impl_from_IStream(iface); ULONG refcount = InterlockedIncrement(&stream->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -530,7 +530,7 @@ static ULONG WINAPI opc_content_stream_Release(IStream *iface) struct opc_content_stream *stream = impl_from_IStream(iface); ULONG refcount = InterlockedDecrement(&stream->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -546,7 +546,7 @@ static HRESULT WINAPI opc_content_stream_Read(IStream *iface, void *buff, ULONG struct opc_content_stream *stream = impl_from_IStream(iface); DWORD read = 0;
- TRACE("iface %p, buff %p, size %u, num_read %p.\n", iface, buff, size, num_read); + TRACE("%p, %p, %lu, %p.\n", iface, buff, size, num_read);
if (!num_read) num_read = &read; @@ -569,7 +569,7 @@ static HRESULT WINAPI opc_content_stream_Write(IStream *iface, const void *data, struct opc_content_stream *stream = impl_from_IStream(iface); DWORD written = 0;
- TRACE("iface %p, data %p, size %u, num_written %p.\n", iface, data, size, num_written); + TRACE("%p, %p, %lu, %p.\n", iface, data, size, num_written);
if (!num_written) num_written = &written; @@ -597,7 +597,7 @@ static HRESULT WINAPI opc_content_stream_Seek(IStream *iface, LARGE_INTEGER move struct opc_content_stream *stream = impl_from_IStream(iface); ULARGE_INTEGER pos;
- TRACE("iface %p, move %s, origin %d, newpos %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, newpos); + TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, newpos);
switch (origin) { @@ -611,7 +611,7 @@ static HRESULT WINAPI opc_content_stream_Seek(IStream *iface, LARGE_INTEGER move pos.QuadPart = stream->content->size.QuadPart + move.QuadPart; break; default: - WARN("Unknown origin mode %d.\n", origin); + WARN("Unknown origin mode %ld.\n", origin); return E_INVALIDARG; }
@@ -641,7 +641,7 @@ static HRESULT WINAPI opc_content_stream_CopyTo(IStream *iface, IStream *dest, U
static HRESULT WINAPI opc_content_stream_Commit(IStream *iface, DWORD flags) { - FIXME("iface %p, flags %#x stub!\n", iface, flags); + FIXME("iface %p, flags %#lx stub!\n", iface, flags);
return E_NOTIMPL; } @@ -656,7 +656,7 @@ static HRESULT WINAPI opc_content_stream_Revert(IStream *iface) static HRESULT WINAPI opc_content_stream_LockRegion(IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER size, DWORD lock_type) { - FIXME("iface %p, offset %s, size %s, lock_type %d stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), + FIXME("iface %p, offset %s, size %s, lock_type %ld stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), wine_dbgstr_longlong(size.QuadPart), lock_type);
return E_NOTIMPL; @@ -665,7 +665,7 @@ static HRESULT WINAPI opc_content_stream_LockRegion(IStream *iface, ULARGE_INTEG static HRESULT WINAPI opc_content_stream_UnlockRegion(IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER size, DWORD lock_type) { - FIXME("iface %p, offset %s, size %s, lock_type %d stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), + FIXME("iface %p, offset %s, size %s, lock_type %ld stub!\n", iface, wine_dbgstr_longlong(offset.QuadPart), wine_dbgstr_longlong(size.QuadPart), lock_type);
return E_NOTIMPL; @@ -673,7 +673,7 @@ static HRESULT WINAPI opc_content_stream_UnlockRegion(IStream *iface, ULARGE_INT
static HRESULT WINAPI opc_content_stream_Stat(IStream *iface, STATSTG *statstg, DWORD flag) { - FIXME("iface %p, statstg %p, flag %d stub!\n", iface, statstg, flag); + FIXME("iface %p, statstg %p, flag %ld stub!\n", iface, statstg, flag);
return E_NOTIMPL; } @@ -761,7 +761,7 @@ static ULONG WINAPI opc_part_AddRef(IOpcPart *iface) struct opc_part *part = impl_from_IOpcPart(iface); ULONG refcount = InterlockedIncrement(&part->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -771,7 +771,7 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface) struct opc_part *part = impl_from_IOpcPart(iface); ULONG refcount = InterlockedDecrement(&part->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -933,7 +933,7 @@ static ULONG WINAPI opc_part_set_AddRef(IOpcPartSet *iface) struct opc_part_set *part_set = impl_from_IOpcPartSet(iface); ULONG refcount = InterlockedIncrement(&part_set->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -943,7 +943,7 @@ static ULONG WINAPI opc_part_set_Release(IOpcPartSet *iface) struct opc_part_set *part_set = impl_from_IOpcPartSet(iface); ULONG refcount = InterlockedDecrement(&part_set->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -1070,7 +1070,7 @@ static ULONG WINAPI opc_relationship_AddRef(IOpcRelationship *iface) struct opc_relationship *relationship = impl_from_IOpcRelationship(iface); ULONG refcount = InterlockedIncrement(&relationship->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -1080,7 +1080,7 @@ static ULONG WINAPI opc_relationship_Release(IOpcRelationship *iface) struct opc_relationship *relationship = impl_from_IOpcRelationship(iface); ULONG refcount = InterlockedDecrement(&relationship->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -1253,7 +1253,7 @@ static ULONG WINAPI opc_relationship_set_AddRef(IOpcRelationshipSet *iface) struct opc_relationship_set *relationship_set = impl_from_IOpcRelationshipSet(iface); ULONG refcount = InterlockedIncrement(&relationship_set->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -1263,7 +1263,7 @@ static ULONG WINAPI opc_relationship_set_Release(IOpcRelationshipSet *iface) struct opc_relationship_set *relationship_set = impl_from_IOpcRelationshipSet(iface); ULONG refcount = InterlockedDecrement(&relationship_set->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -1432,7 +1432,7 @@ static ULONG WINAPI opc_package_AddRef(IOpcPackage *iface) struct opc_package *package = impl_from_IOpcPackage(iface); ULONG refcount = InterlockedIncrement(&package->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -1442,7 +1442,7 @@ static ULONG WINAPI opc_package_Release(IOpcPackage *iface) struct opc_package *package = impl_from_IOpcPackage(iface); ULONG refcount = InterlockedDecrement(&package->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { diff --git a/dlls/opcservices/uri.c b/dlls/opcservices/uri.c index 5cba14aa78b..0a7e2ef3660 100644 --- a/dlls/opcservices/uri.c +++ b/dlls/opcservices/uri.c @@ -60,7 +60,7 @@ static ULONG WINAPI opc_uri_AddRef(IOpcPartUri *iface) struct opc_uri *uri = impl_from_IOpcPartUri(iface); ULONG refcount = InterlockedIncrement(&uri->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; } @@ -70,7 +70,7 @@ static ULONG WINAPI opc_uri_Release(IOpcPartUri *iface) struct opc_uri *uri = impl_from_IOpcPartUri(iface); ULONG refcount = InterlockedDecrement(&uri->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) { @@ -90,7 +90,7 @@ static HRESULT WINAPI opc_uri_GetPropertyBSTR(IOpcPartUri *iface, Uri_PROPERTY p { struct opc_uri *uri = impl_from_IOpcPartUri(iface);
- TRACE("iface %p, property %d, value %p, flags %#x.\n", iface, property, value, flags); + TRACE("iface %p, property %d, value %p, flags %#lx.\n", iface, property, value, flags);
return IUri_GetPropertyBSTR(uri->uri, property, value, flags); } @@ -100,7 +100,7 @@ static HRESULT WINAPI opc_uri_GetPropertyLength(IOpcPartUri *iface, Uri_PROPERTY { struct opc_uri *uri = impl_from_IOpcPartUri(iface);
- TRACE("iface %p, property %d, length %p, flags %#x.\n", iface, property, length, flags); + TRACE("iface %p, property %d, length %p, flags %#lx.\n", iface, property, length, flags);
return IUri_GetPropertyLength(uri->uri, property, length, flags); } @@ -110,7 +110,7 @@ static HRESULT WINAPI opc_uri_GetPropertyDWORD(IOpcPartUri *iface, Uri_PROPERTY { struct opc_uri *uri = impl_from_IOpcPartUri(iface);
- TRACE("iface %p, property %d, value %p, flags %#x.\n", iface, property, value, flags); + TRACE("iface %p, property %d, value %p, flags %#lx.\n", iface, property, value, flags);
return IUri_GetPropertyDWORD(uri->uri, property, value, flags); } @@ -504,7 +504,7 @@ static IUri *opc_part_uri_get_rels_uri(IUri *uri) lstrcatW(ret, relsextW);
if (FAILED(hr = CreateUri(ret, Uri_CREATE_ALLOW_RELATIVE, 0, &rels_uri))) - WARN("Failed to create rels uri, hr %#x.\n", hr); + WARN("Failed to create rels uri, hr %#lx.\n", hr); heap_free(ret); SysFreeString(path);
@@ -544,7 +544,7 @@ static HRESULT opc_source_uri_create(struct opc_uri *uri, IOpcUri **out)
if (FAILED(hr = opc_part_uri_init(obj, NULL, uri->source_uri->is_part_uri, uri->source_uri->uri))) { - WARN("Failed to init part uri, hr %#x.\n", hr); + WARN("Failed to init part uri, hr %#lx.\n", hr); heap_free(obj); return hr; } @@ -566,7 +566,7 @@ HRESULT opc_part_uri_create(IUri *uri, struct opc_uri *source_uri, IOpcPartUri *
if (FAILED(hr = opc_part_uri_init(obj, source_uri, TRUE, uri))) { - WARN("Failed to init part uri, hr %#x.\n", hr); + WARN("Failed to init part uri, hr %#lx.\n", hr); heap_free(obj); return hr; } @@ -589,7 +589,7 @@ HRESULT opc_root_uri_create(IOpcUri **out)
if (FAILED(hr = CreateUri(L"/", Uri_CREATE_ALLOW_RELATIVE, 0, &uri))) { - WARN("Failed to create rels uri, hr %#x.\n", hr); + WARN("Failed to create rels uri, hr %#lx.\n", hr); heap_free(obj); return hr; } @@ -598,7 +598,7 @@ HRESULT opc_root_uri_create(IOpcUri **out) IUri_Release(uri); if (FAILED(hr)) { - WARN("Failed to init uri, hr %#x.\n", hr); + WARN("Failed to init uri, hr %#lx.\n", hr); heap_free(uri); return hr; }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/tests/Makefile.in | 1 - dlls/opcservices/tests/opcservices.c | 374 +++++++++++++-------------- 2 files changed, 187 insertions(+), 188 deletions(-)
diff --git a/dlls/opcservices/tests/Makefile.in b/dlls/opcservices/tests/Makefile.in index c121c34e398..4fa222e9273 100644 --- a/dlls/opcservices/tests/Makefile.in +++ b/dlls/opcservices/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = opcservices.dll IMPORTS = ole32 urlmon oleaut32
diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index 59cd3b5df30..871619430d4 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -62,7 +62,7 @@ static void test_package(void) factory = create_factory();
hr = IOpcFactory_CreatePackage(factory, &package); - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#lx.\n", hr); if (FAILED(hr)) { IOpcFactory_Release(factory); @@ -70,118 +70,118 @@ static void test_package(void) }
hr = IOpcPackage_GetPartSet(package, &partset); - ok(SUCCEEDED(hr), "Failed to create a part set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a part set, hr %#lx.\n", hr);
hr = IOpcPackage_GetPartSet(package, &partset2); - ok(SUCCEEDED(hr), "Failed to create a part set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a part set, hr %#lx.\n", hr); ok(partset == partset2, "Expected same part set instance.\n"); IOpcPartSet_Release(partset2);
/* CreatePart */ hr = IOpcFactory_CreatePartUri(factory, uriW, &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcFactory_CreatePartUri(factory, uriW, &part_uri2); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
part = (void *)0xdeadbeef; hr = IOpcPartSet_CreatePart(partset, NULL, typeW, OPC_COMPRESSION_NONE, &part); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(part == NULL, "Unexpected pointer %p.\n", part);
hr = IOpcPartSet_CreatePart(partset, part_uri, typeW, OPC_COMPRESSION_NONE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartSet_CreatePart(partset, part_uri, typeW, 0xdeadbeef, &part); - ok(SUCCEEDED(hr), "Failed to create a part, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a part, hr %#lx.\n", hr); hr = IOpcPart_GetCompressionOptions(part, &options); - ok(SUCCEEDED(hr), "Failed to get compression options, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get compression options, hr %#lx.\n", hr); ok(options == 0xdeadbeef, "Unexpected compression options %#x.\n", options);
part2 = (void *)0xdeadbeef; hr = IOpcPartSet_CreatePart(partset, part_uri, typeW, OPC_COMPRESSION_NONE, &part2); - ok(hr == OPC_E_DUPLICATE_PART, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_DUPLICATE_PART, "Unexpected hr %#lx.\n", hr); ok(part2 == NULL, "Unexpected instance %p.\n", part2);
part2 = (void *)0xdeadbeef; hr = IOpcPartSet_CreatePart(partset, part_uri2, typeW, OPC_COMPRESSION_NONE, &part2); - ok(hr == OPC_E_DUPLICATE_PART, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_DUPLICATE_PART, "Unexpected hr %#lx.\n", hr); ok(part2 == NULL, "Unexpected instance %p.\n", part2); IOpcPartUri_Release(part_uri2);
hr = IOpcPartSet_GetPart(partset, NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
part2 = (void *)0xdeadbeef; hr = IOpcPartSet_GetPart(partset, NULL, &part2); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(part2 == NULL, "Unexpected pointer %p.\n", part2);
hr = IOpcPartSet_GetPart(partset, part_uri, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartSet_GetPart(partset, part_uri, &part2); - ok(SUCCEEDED(hr), "Failed to get part, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get part, hr %#lx.\n", hr); IOpcPart_Release(part2);
hr = IOpcFactory_CreatePartUri(factory, targetW, &part_uri2); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcPartSet_GetPart(partset, part_uri2, &part2); - ok(hr == OPC_E_NO_SUCH_PART, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_NO_SUCH_PART, "Unexpected hr %#lx.\n", hr); IOpcPartUri_Release(part_uri2);
hr = IOpcPart_GetContentStream(part, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPart_GetContentStream(part, &stream); - ok(SUCCEEDED(hr), "Failed to get content stream, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get content stream, hr %#lx.\n", hr);
hr = IStream_Write(stream, "abc", 3, NULL); - ok(hr == S_OK, "Failed to write content, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to write content, hr %#lx.\n", hr);
move.QuadPart = 0; hr = IStream_Seek(stream, move, STREAM_SEEK_CUR, &pos); - ok(SUCCEEDED(hr), "Seek failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); ok(pos.QuadPart == 3, "Unexpected position.\n");
hr = IOpcPart_GetContentStream(part, &stream2); - ok(SUCCEEDED(hr), "Failed to get content stream, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get content stream, hr %#lx.\n", hr); ok(stream != stream2, "Unexpected instance.\n");
move.QuadPart = 0; hr = IStream_Seek(stream2, move, STREAM_SEEK_CUR, &pos); - ok(SUCCEEDED(hr), "Seek failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); ok(pos.QuadPart == 0, "Unexpected position.\n");
memset(buff, 0, sizeof(buff)); hr = IStream_Read(stream2, buff, sizeof(buff), NULL); - ok(hr == S_OK, "Failed to read content, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to read content, hr %#lx.\n", hr); ok(!memcmp(buff, "abc", 3), "Unexpected content.\n");
move.QuadPart = 0; hr = IStream_Seek(stream2, move, STREAM_SEEK_CUR, &pos); - ok(SUCCEEDED(hr), "Seek failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); ok(pos.QuadPart == 3, "Unexpected position.\n");
IStream_Release(stream); IStream_Release(stream2);
hr = IOpcPart_GetRelationshipSet(part, &relset); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr);
hr = IOpcPart_GetRelationshipSet(part, &relset2); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr); ok(relset == relset2, "Expected same part set instance.\n");
hr = CreateUri(targetW, Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(relset, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr);
hr = IOpcRelationship_GetSourceUri(rel, &uri); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); ok(uri == (IOpcUri *)part_uri, "Unexpected source uri.\n");
IOpcUri_Release(uri); @@ -194,15 +194,15 @@ static void test_package(void)
ret = 123; hr = IOpcPartSet_PartExists(partset, NULL, &ret); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(ret == 123, "Unexpected return value.\n");
hr = IOpcPartSet_PartExists(partset, part_uri, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = FALSE; hr = IOpcPartSet_PartExists(partset, part_uri, &ret); - ok(SUCCEEDED(hr), "Unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok(ret, "Expected part to exist.\n");
IOpcPartUri_Release(part_uri); @@ -210,10 +210,10 @@ static void test_package(void)
/* Relationships */ hr = IOpcPackage_GetRelationshipSet(package, &relset); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr);
hr = IOpcPackage_GetRelationshipSet(package, &relset2); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr); ok(relset == relset2, "Expected same part set instance.\n"); IOpcRelationshipSet_Release(relset); IOpcRelationshipSet_Release(relset2); @@ -223,11 +223,11 @@ static void test_package(void)
/* Root uri */ hr = IOpcFactory_CreatePackageRootUri(factory, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); hr = IOpcFactory_CreatePackageRootUri(factory, &uri); - ok(SUCCEEDED(hr), "Failed to create root uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create root uri, hr %#lx.\n", hr); hr = IOpcUri_GetRawUri(uri, &str); - ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#lx.\n", hr); ok(!lstrcmpW(str, rootW), "Unexpected uri %s.\n", wine_dbgstr_w(str)); SysFreeString(str); IOpcUri_Release(uri); @@ -242,15 +242,15 @@ static void test_stream_stat_(unsigned int line, IStream *stream, ULONG size) HRESULT hr;
hr = IStream_Stat(stream, NULL, 0); - ok_(__FILE__, line)(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
memset(&statstg, 0xff, sizeof(statstg)); hr = IStream_Stat(stream, &statstg, 0); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get stat info, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get stat info, hr %#lx.\n", hr);
ok_(__FILE__, line)(statstg.pwcsName == NULL, "Unexpected name %s.\n", wine_dbgstr_w(statstg.pwcsName)); ok_(__FILE__, line)(statstg.type == STGTY_STREAM, "Unexpected type.\n"); - ok_(__FILE__, line)(statstg.cbSize.QuadPart == size, "Unexpected size %u, expected %u.\n", + ok_(__FILE__, line)(statstg.cbSize.QuadPart == size, "Unexpected size %lu, expected %lu.\n", statstg.cbSize.LowPart, size); ok_(__FILE__, line)(statstg.grfMode == STGM_READ, "Unexpected mode.\n"); ok_(__FILE__, line)(statstg.grfLocksSupported == 0, "Unexpected lock mode.\n"); @@ -271,7 +271,7 @@ static void test_file_stream(void) factory = create_factory();
hr = IOpcFactory_CreateStreamOnFile(factory, NULL, OPC_STREAM_IO_READ, NULL, 0, &stream); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
GetTempPathW(ARRAY_SIZE(temppathW), temppathW); lstrcpyW(pathW, temppathW); @@ -279,52 +279,52 @@ static void test_file_stream(void) DeleteFileW(pathW);
hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_READ, NULL, 0, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* File does not exist */ hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_READ, NULL, 0, &stream); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_WRITE, NULL, 0, &stream); - ok(SUCCEEDED(hr), "Failed to create a write stream, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a write stream, hr %#lx.\n", hr);
test_stream_stat(stream, 0);
size = lstrlenW(pathW) * sizeof(WCHAR); hr = IStream_Write(stream, pathW, size, NULL); - ok(hr == S_OK, "Stream write failed, hr %#x.\n", hr); + ok(hr == S_OK, "Stream write failed, hr %#lx.\n", hr);
test_stream_stat(stream, size); IStream_Release(stream);
/* Invalid I/O mode */ hr = IOpcFactory_CreateStreamOnFile(factory, pathW, 10, NULL, 0, &stream); - ok(hr == E_INVALIDARG, "Failed to create a write stream, hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Failed to create a write stream, hr %#lx.\n", hr);
/* Write to read-only stream. */ hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_READ, NULL, 0, &stream); - ok(SUCCEEDED(hr), "Failed to create a read stream, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a read stream, hr %#lx.\n", hr);
test_stream_stat(stream, size); hr = IStream_Write(stream, pathW, size, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED), "Stream write failed, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED), "Stream write failed, hr %#lx.\n", hr); IStream_Release(stream);
/* Read from write-only stream. */ hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_WRITE, NULL, 0, &stream); - ok(SUCCEEDED(hr), "Failed to create a read stream, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a read stream, hr %#lx.\n", hr);
test_stream_stat(stream, 0); hr = IStream_Write(stream, pathW, size, NULL); - ok(hr == S_OK, "Stream write failed, hr %#x.\n", hr); + ok(hr == S_OK, "Stream write failed, hr %#lx.\n", hr); test_stream_stat(stream, size);
move.QuadPart = 0; hr = IStream_Seek(stream, move, STREAM_SEEK_SET, NULL); - ok(SUCCEEDED(hr), "Seek failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr);
hr = IStream_Read(stream, buff, sizeof(buff), NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED), "Stream read failed, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED), "Stream read failed, hr %#lx.\n", hr);
IStream_Release(stream);
@@ -342,10 +342,10 @@ static void test_relationship(void) IOpcRelationship *rel, *rel2, *rel3; IOpcUri *source_uri, *source_uri2; IOpcRelationshipSet *rels; + OPC_URI_TARGET_MODE mode; IOpcFactory *factory; IOpcPackage *package; IUnknown *unk; - DWORD mode; HRESULT hr; WCHAR *id; BOOL ret; @@ -354,7 +354,7 @@ static void test_relationship(void) factory = create_factory();
hr = IOpcFactory_CreatePackage(factory, &package); - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#lx.\n", hr); if (FAILED(hr)) { IOpcFactory_Release(factory); @@ -362,122 +362,122 @@ static void test_relationship(void) }
hr = CreateUri(targetW, Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr);
hr = CreateUri(absoluteW, 0, 0, &target_uri2); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr);
hr = IOpcPackage_GetRelationshipSet(package, &rels); - ok(SUCCEEDED(hr), "Failed to get part set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get part set, hr %#lx.\n", hr);
rel = (void *)0xdeadbeef; hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, NULL, NULL, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(rel == NULL, "Unexpected instance %p.\n", rel);
rel = (void *)0xdeadbeef; hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, NULL, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(rel == NULL, "Unexpected instance %p.\n", rel);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, NULL, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Absolute target uri with internal mode */ rel = (void *)0xdeadbeef; hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, target_uri2, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(hr == OPC_E_INVALID_RELATIONSHIP_TARGET, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_INVALID_RELATIONSHIP_TARGET, "Unexpected hr %#lx.\n", hr); ok(rel == NULL, "Unexpected instance %p.\n", rel);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr);
/* Autogenerated relationship id */ hr = IOpcRelationship_GetId(rel, &id); - ok(SUCCEEDED(hr), "Failed to get id, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get id, hr %#lx.\n", hr); ok(lstrlenW(id) == 9 && *id == 'R', "Unexpected relationship id %s.\n", wine_dbgstr_w(id));
hr = IOpcRelationshipSet_CreateRelationship(rels, id, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel2); - ok(hr == OPC_E_DUPLICATE_RELATIONSHIP, "Failed to create relationship, hr %#x.\n", hr); + ok(hr == OPC_E_DUPLICATE_RELATIONSHIP, "Failed to create relationship, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(rels, id, typeW, target_uri2, OPC_URI_TARGET_MODE_INTERNAL, &rel2); - ok(hr == OPC_E_DUPLICATE_RELATIONSHIP, "Failed to create relationship, hr %#x.\n", hr); + ok(hr == OPC_E_DUPLICATE_RELATIONSHIP, "Failed to create relationship, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel2); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr);
ret = 123; hr = IOpcRelationshipSet_RelationshipExists(rels, NULL, &ret); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(ret == 123, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipSet_RelationshipExists(rels, id, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = FALSE; hr = IOpcRelationshipSet_RelationshipExists(rels, id, &ret); - ok(SUCCEEDED(hr), "Failed to get relationship, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get relationship, hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipSet_GetRelationship(rels, id, &rel3); - ok(SUCCEEDED(hr), "Failed to get relationship, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get relationship, hr %#lx.\n", hr); IOpcRelationship_Release(rel3);
hr = IOpcRelationshipSet_GetRelationship(rels, id, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
rel3 = (void *)0xdeadbeef; hr = IOpcRelationshipSet_GetRelationship(rels, NULL, &rel3); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(rel3 == NULL, "Expected null pointer.\n");
*id = 'r'; rel3 = (void *)0xdeadbeef; hr = IOpcRelationshipSet_GetRelationship(rels, id, &rel3); - ok(hr == OPC_E_NO_SUCH_RELATIONSHIP, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_NO_SUCH_RELATIONSHIP, "Unexpected hr %#lx.\n", hr); ok(rel3 == NULL, "Expected null pointer.\n");
ret = TRUE; hr = IOpcRelationshipSet_RelationshipExists(rels, id, &ret); - ok(SUCCEEDED(hr), "Unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
CoTaskMemFree(id);
hr = IOpcRelationship_GetTargetUri(rel, &uri); - ok(SUCCEEDED(hr), "Failed to get target uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get target uri, hr %#lx.\n", hr); ok(uri == target_uri, "Unexpected uri.\n"); IUri_Release(uri);
hr = IOpcRelationship_GetTargetMode(rel, &mode); - ok(SUCCEEDED(hr), "Failed to get target mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get target mode, hr %#lx.\n", hr); ok(mode == OPC_URI_TARGET_MODE_INTERNAL, "Unexpected mode %d.\n", mode);
/* Source uri */ hr = IOpcFactory_CreatePackageRootUri(factory, &source_uri); - ok(SUCCEEDED(hr), "Failed to create root uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create root uri, hr %#lx.\n", hr);
hr = IOpcFactory_CreatePackageRootUri(factory, &source_uri2); - ok(SUCCEEDED(hr), "Failed to create root uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create root uri, hr %#lx.\n", hr); ok(source_uri != source_uri2, "Unexpected uri instance.\n");
IOpcUri_Release(source_uri); IOpcUri_Release(source_uri2);
hr = IOpcRelationship_GetSourceUri(rel, &source_uri); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr);
hr = IOpcUri_QueryInterface(source_uri, &IID_IOpcPartUri, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
str = NULL; hr = IOpcUri_GetRawUri(source_uri, &str); - ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#lx.\n", hr); ok(!lstrcmpW(rootW, str), "Unexpected uri %s.\n", wine_dbgstr_w(str)); SysFreeString(str);
hr = IOpcRelationship_GetSourceUri(rel2, &source_uri2); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); ok(source_uri2 == source_uri, "Unexpected source uri.\n");
IOpcUri_Release(source_uri2); @@ -554,20 +554,20 @@ static void test_rel_part_uri(void) factory = create_factory();
hr = IOpcFactory_CreatePartUri(factory, testuriW, &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcPartUri_GetRelationshipsPartUri(part_uri, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartUri_IsRelationshipsPartUri(part_uri, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartUri_GetSourceUri(part_uri, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
source_uri = (void *)0xdeadbeef; hr = IOpcPartUri_GetSourceUri(part_uri, &source_uri); - ok(hr == OPC_E_RELATIONSHIP_URI_REQUIRED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_RELATIONSHIP_URI_REQUIRED, "Unexpected hr %#lx.\n", hr); ok(source_uri == NULL, "Expected null uri.\n");
IOpcPartUri_Release(part_uri); @@ -589,7 +589,7 @@ static void test_rel_part_uri(void) } else hr = IOpcFactory_CreatePartUri(factory, uriW, (IOpcPartUri **)&part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
rel_uri = (void *)0xdeadbeef; hr = IOpcUri_GetRelationshipsPartUri(part_uri, &rel_uri); @@ -602,26 +602,26 @@ static void test_rel_part_uri(void) BSTR str;
hr = IOpcPartUri_GetSourceUri(rel_uri, &source_uri); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); hr = IOpcPartUri_GetSourceUri(rel_uri, &source_uri2); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); ok(source_uri != source_uri2, "Unexpected instance.\n");
hr = IOpcUri_IsEqual(source_uri, NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = 123; hr = IOpcUri_IsEqual(source_uri, NULL, &ret); - ok(is_root ? hr == E_POINTER : hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(is_root ? hr == E_POINTER : hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(is_root ? ret == 123 : !ret, "Unexpected result.\n");
ret = FALSE; hr = IOpcUri_IsEqual(source_uri, (IUri *)source_uri2, &ret); - ok(SUCCEEDED(hr), "IsEqual failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IsEqual failed, hr %#lx.\n", hr); ok(ret, "Expected equal uris.\n");
hr = IOpcUri_QueryInterface(source_uri, &IID_IOpcPartUri, (void **)&unk); - ok(hr == (is_root ? E_NOINTERFACE : S_OK), "Unexpected hr %#x, %s.\n", hr, rel_part_uri_tests[i].uri); + ok(hr == (is_root ? E_NOINTERFACE : S_OK), "Unexpected hr %#lx, %s.\n", hr, rel_part_uri_tests[i].uri); if (unk) IUnknown_Release(unk);
@@ -629,12 +629,12 @@ static void test_rel_part_uri(void) IOpcUri_Release(source_uri);
hr = IOpcUri_GetRelationshipsPartUri(part_uri, &rel_uri2); - ok(SUCCEEDED(hr), "Failed to get rels part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get rels part uri, hr %#lx.\n", hr); ok(rel_uri2 != rel_uri, "Unexpected instance.\n"); IOpcPartUri_Release(rel_uri2);
hr = IOpcPartUri_GetRawUri(rel_uri, &str); - ok(SUCCEEDED(hr), "Failed to get rel uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get rel uri, hr %#lx.\n", hr); todo_wine_if(i == 3 || i == 4 || i == 8 || i == 9) ok(!lstrcmpW(str, rel_uriW), "%u: unexpected rel uri %s, expected %s.\n", i, wine_dbgstr_w(str), wine_dbgstr_w(rel_uriW)); @@ -644,7 +644,7 @@ static void test_rel_part_uri(void) } else { - ok(hr == rel_part_uri_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr); + ok(hr == rel_part_uri_tests[i].hr, "%u: unexpected hr %#lx.\n", i, hr); ok(rel_uri == NULL, "%u: unexpected out pointer.\n", i); }
@@ -662,11 +662,11 @@ static void test_rel_part_uri(void) uriW = strdupAtoW(is_rel_part_tests[i].uri);
hr = IOpcFactory_CreatePartUri(factory, uriW, &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
ret = 123; hr = IOpcPartUri_IsRelationshipsPartUri(part_uri, &ret); - ok(SUCCEEDED(hr), "Unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok(ret == is_rel_part_tests[i].ret, "%u: unexpected result %d.\n", i, ret);
heap_free(uriW); @@ -693,7 +693,7 @@ static void test_part_enumerator(void) factory = create_factory();
hr = IOpcFactory_CreatePackage(factory, &package); - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#lx.\n", hr); if (FAILED(hr)) { IOpcFactory_Release(factory); @@ -701,131 +701,131 @@ static void test_part_enumerator(void) }
hr = IOpcPackage_GetPartSet(package, &parts); - ok(SUCCEEDED(hr), "Failed to get part set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get part set, hr %#lx.\n", hr);
hr = IOpcPartSet_GetEnumerator(parts, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartSet_GetEnumerator(parts, &partenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr);
hr = IOpcPartSet_GetEnumerator(parts, &partenum2); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); ok(partenum != partenum2, "Unexpected instance.\n"); IOpcPartEnumerator_Release(partenum2);
hr = IOpcPartEnumerator_GetCurrent(partenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartEnumerator_GetCurrent(partenum, &part); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartEnumerator_MoveNext(partenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = TRUE; hr = IOpcPartEnumerator_MoveNext(partenum, &ret); - ok(hr == S_OK, "Failed to move, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to move, hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
ret = TRUE; hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); - ok(hr == S_OK, "Failed to move, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to move, hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
hr = IOpcFactory_CreatePartUri(factory, uriW, &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcPartSet_CreatePart(parts, part_uri, typeW, OPC_COMPRESSION_NONE, &part); - ok(SUCCEEDED(hr), "Failed to create a part, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a part, hr %#lx.\n", hr); IOpcPartUri_Release(part_uri);
part2 = (void *)0xdeadbeef; hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(part2 == NULL, "Unexpected instance.\n");
hr = IOpcPartEnumerator_MoveNext(partenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = 123; hr = IOpcPartEnumerator_MoveNext(partenum, &ret); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(ret == 123, "Unexpected result %d.\n", ret);
hr = IOpcPartEnumerator_MovePrevious(partenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = 123; hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(ret == 123, "Unexpected result %d.\n", ret);
hr = IOpcPartEnumerator_Clone(partenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
partenum2 = (void *)0xdeadbeef; hr = IOpcPartEnumerator_Clone(partenum, &partenum2); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(partenum2 == NULL, "Unexpected instance.\n");
IOpcPartEnumerator_Release(partenum);
hr = IOpcPartSet_GetEnumerator(parts, &partenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr);
part2 = (void *)0xdeadbeef; hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr); ok(part2 == NULL, "Unexpected instance.\n");
hr = IOpcPartEnumerator_MoveNext(partenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(part2 == part, "Unexpected instance.\n"); IOpcPart_Release(part2);
hr = IOpcPartEnumerator_MoveNext(partenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
part2 = (void *)0xdeadbeef; hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr); ok(part2 == NULL, "Unexpected instance.\n");
hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(part2 == part, "Unexpected instance.\n"); IOpcPart_Release(part2);
hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartEnumerator_Clone(partenum, &partenum2); - ok(SUCCEEDED(hr), "Clone failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Clone failed, hr %#lx.\n", hr);
hr = IOpcPartEnumerator_MoveNext(partenum2, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcPartEnumerator_GetCurrent(partenum2, &part2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IOpcPart_Release(part2);
hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
IOpcPartEnumerator_Release(partenum2);
@@ -855,7 +855,7 @@ static void test_rels_enumerator(void) factory = create_factory();
hr = IOpcFactory_CreatePackage(factory, &package); - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#lx.\n", hr); if (FAILED(hr)) { IOpcFactory_Release(factory); @@ -863,132 +863,132 @@ static void test_rels_enumerator(void) }
hr = IOpcPackage_GetRelationshipSet(package, &rels); - ok(SUCCEEDED(hr), "Failed to get part set, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get part set, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_GetEnumerator(rels, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcRelationshipSet_GetEnumerator(rels, &relsenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_GetEnumerator(rels, &relsenum2); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); ok(relsenum != relsenum2, "Unexpected instance.\n"); IOpcRelationshipEnumerator_Release(relsenum2);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
hr = IOpcRelationshipEnumerator_MoveNext(relsenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = TRUE; hr = IOpcRelationshipEnumerator_MoveNext(relsenum, &ret); - ok(hr == S_OK, "Failed to move, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to move, hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
ret = TRUE; hr = IOpcRelationshipEnumerator_MovePrevious(relsenum, &ret); - ok(hr == S_OK, "Failed to move, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to move, hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
hr = CreateUri(targetW, Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr);
IUri_Release(target_uri);
rel2 = (void *)0xdeadbeef; hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(rel2 == NULL, "Unexpected instance.\n");
hr = IOpcRelationshipEnumerator_MoveNext(relsenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = 123; hr = IOpcRelationshipEnumerator_MoveNext(relsenum, &ret); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(ret == 123, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipEnumerator_MovePrevious(relsenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = 123; hr = IOpcRelationshipEnumerator_MovePrevious(relsenum, &ret); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(ret == 123, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipEnumerator_Clone(relsenum, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
relsenum2 = (void *)0xdeadbeef; hr = IOpcRelationshipEnumerator_Clone(relsenum, &relsenum2); - ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_COLLECTION_CHANGED, "Unexpected hr %#lx.\n", hr); ok(relsenum2 == NULL, "Unexpected instance.\n");
IOpcRelationshipEnumerator_Release(relsenum);
hr = IOpcRelationshipSet_GetEnumerator(rels, &relsenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr);
rel2 = (void *)0xdeadbeef; hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr); ok(rel2 == NULL, "Unexpected instance.\n");
hr = IOpcRelationshipEnumerator_MoveNext(relsenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rel2 == rel, "Unexpected instance.\n"); IOpcRelationship_Release(rel2);
hr = IOpcRelationshipEnumerator_MoveNext(relsenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
rel2 = (void *)0xdeadbeef; hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr); ok(rel2 == NULL, "Unexpected instance.\n");
hr = IOpcRelationshipEnumerator_MovePrevious(relsenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rel2 == rel, "Unexpected instance.\n"); IOpcRelationship_Release(rel2);
hr = IOpcRelationshipEnumerator_MovePrevious(relsenum, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
hr = IOpcRelationshipEnumerator_Clone(relsenum, &relsenum2); - ok(SUCCEEDED(hr), "Clone failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Clone failed, hr %#lx.\n", hr);
hr = IOpcRelationshipEnumerator_MoveNext(relsenum2, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum2, &rel2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IOpcRelationship_Release(rel2);
hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); - ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#x.\n", hr); + ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
IOpcRelationshipEnumerator_Release(relsenum2);
@@ -1047,22 +1047,22 @@ static void test_relative_uri(void) hr = IOpcFactory_CreatePackageRootUri(factory, &part_uri); else hr = IOpcFactory_CreatePartUri(factory, uriW, (IOpcPartUri **)&part_uri); - ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#lx.\n", i, hr);
hr = IOpcFactory_CreatePartUri(factory, combinedW, &combined_uri); - ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#lx.\n", i, hr);
hr = IOpcUri_GetRelativeUri(part_uri, combined_uri, &relative_uri); todo_wine - ok(SUCCEEDED(hr), "%u: failed t oget relative uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed t oget relative uri, hr %#lx.\n", i, hr);
if (SUCCEEDED(hr)) { hr = IUri_QueryInterface(relative_uri, &IID_IOpcUri, (void **)&unk); - ok(hr == E_NOINTERFACE, "%u: unexpected hr %#x.\n", i, hr); + ok(hr == E_NOINTERFACE, "%u: unexpected hr %#lx.\n", i, hr);
hr = IUri_GetRawUri(relative_uri, &str); - ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#lx.\n", i, hr); ok(!lstrcmpW(str, relativeW) || broken(relative_broken_W && !lstrcmpW(str, relative_broken_W)), "%u: unexpected relative uri %s.\n", i, wine_dbgstr_w(str)); SysFreeString(str); @@ -1118,24 +1118,24 @@ static void test_combine_uri(void) hr = IOpcFactory_CreatePackageRootUri(factory, &uri); else hr = IOpcFactory_CreatePartUri(factory, uriW, (IOpcPartUri **)&uri); - ok(SUCCEEDED(hr), "%u: failed to create uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to create uri, hr %#lx.\n", i, hr);
hr = CreateUri(relativeW, Uri_CREATE_ALLOW_RELATIVE, 0, &relative_uri); - ok(SUCCEEDED(hr), "%u: failed to create relative uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to create relative uri, hr %#lx.\n", i, hr);
combined_uri = (void *)0xdeadbeef; hr = IOpcUri_CombinePartUri(uri, NULL, &combined_uri); - ok(hr == E_POINTER, "%u: failed to combine uris, hr %#x.\n", i, hr); + ok(hr == E_POINTER, "%u: failed to combine uris, hr %#lx.\n", i, hr); ok(!combined_uri, "Unexpected instance.\n");
hr = IOpcUri_CombinePartUri(uri, relative_uri, NULL); - ok(hr == E_POINTER, "%u: failed to combine uris, hr %#x.\n", i, hr); + ok(hr == E_POINTER, "%u: failed to combine uris, hr %#lx.\n", i, hr);
hr = IOpcUri_CombinePartUri(uri, relative_uri, &combined_uri); - ok(SUCCEEDED(hr), "%u: failed to combine uris, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to combine uris, hr %#lx.\n", i, hr);
hr = IOpcPartUri_GetRawUri(combined_uri, &str); - ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#lx.\n", i, hr); todo_wine_if(i == 2 || i == 3) ok(!lstrcmpW(str, combinedW), "%u: unexpected uri %s.\n", i, wine_dbgstr_w(str)); SysFreeString(str); @@ -1186,20 +1186,20 @@ static void test_create_part_uri(void) rawW = strdupAtoW(create_part_uri_tests[i].raw_uri);
hr = IOpcFactory_CreatePartUri(factory, inputW, &part_uri); - ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#lx.\n", i, hr);
hr = IOpcPartUri_GetRawUri(part_uri, &str); - ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#lx.\n", hr); todo_wine_if(i == 1 || i == 2 || i == 4) ok(!lstrcmpW(str, rawW), "%u: unexpected raw uri %s.\n", i, wine_dbgstr_w(str)); SysFreeString(str);
hr = CreateUri(rawW, Uri_CREATE_ALLOW_RELATIVE, 0, &uri); - ok(SUCCEEDED(hr), "Failed to create uri, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create uri, hr %#lx.\n", hr);
ret = FALSE; hr = IOpcPartUri_IsEqual(part_uri, uri, &ret); - ok(SUCCEEDED(hr), "IsEqual failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IsEqual failed, hr %#lx.\n", hr); todo_wine_if(i == 1 || i == 2 || i == 4) ok(!!ret, "%u: unexpected result %d.\n", i, ret);
@@ -1266,7 +1266,7 @@ static void test_write_package(void) factory = create_factory();
hr = IOpcFactory_CreatePackage(factory, &package); - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#lx.\n", hr); if (FAILED(hr)) { IOpcFactory_Release(factory); @@ -1274,16 +1274,16 @@ static void test_write_package(void) }
hr = IOpcFactory_WritePackageToStream(factory, NULL, OPC_WRITE_FORCE_ZIP32, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(SUCCEEDED(hr), "Failed to create a stream, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a stream, hr %#lx.\n", hr);
hr = IOpcFactory_WritePackageToStream(factory, NULL, OPC_WRITE_FORCE_ZIP32, stream); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcFactory_WritePackageToStream(factory, &custom_package, OPC_WRITE_FORCE_ZIP32, stream); - ok(hr == 0x80000001, "Unexpected hr %#x.\n", hr); + ok(hr == 0x80000001, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
@@ -1297,7 +1297,7 @@ START_TEST(opcservices) HRESULT hr;
hr = CoInitialize(NULL); - ok(SUCCEEDED(hr), "Failed to initialize COM, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to initialize COM, hr %#lx.\n", hr);
if (!(factory = create_factory())) { win_skip("Failed to create IOpcFactory factory.\n");