ole32/tests: Win64 printf format warning fixes.
Michael [Plouj] Ploujnikov
ploujj at gmail.com
Fri Oct 13 21:54:46 CDT 2006
--
() ASCII Ribbon Campaign
/\ - against HTML mail & vCards
-------------- next part --------------
ole32/tests: Win64 printf format warning fixes.
From: Michael Ploujnikov <ploujj at gmail.com>
changed some macros
---
dlls/ole32/tests/Makefile.in | 1
dlls/ole32/tests/clipboard.c | 10 +--
dlls/ole32/tests/compobj.c | 38 +++++-----
dlls/ole32/tests/hglobalstream.c | 10 +--
dlls/ole32/tests/marshal.c | 70 +++++++++---------
dlls/ole32/tests/moniker.c | 72 ++++++++++---------
dlls/ole32/tests/ole2.c | 2 -
dlls/ole32/tests/propvariant.c | 8 +-
dlls/ole32/tests/stg_prop.c | 144 +++++++++++++++++++-------------------
dlls/ole32/tests/storage32.c | 62 ++++++++--------
10 files changed, 208 insertions(+), 209 deletions(-)
diff --git a/dlls/ole32/tests/Makefile.in b/dlls/ole32/tests/Makefile.in
index 9bddf0e..5d9de7b 100644
--- a/dlls/ole32/tests/Makefile.in
+++ b/dlls/ole32/tests/Makefile.in
@@ -5,7 +5,6 @@ VPATH = @srcdir@
TESTDLL = ole32.dll
IMPORTS = oleaut32 ole32 user32 gdi32 kernel32
EXTRALIBS = -luuid
-EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
clipboard.c \
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index c4c5882..ad15b5e 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -256,7 +256,7 @@ static HRESULT WINAPI DataObjectImpl_Enu
DataObjectImpl *This = (DataObjectImpl*)iface;
if(dwDirection != DATADIR_GET) {
- ok(0, "unexpected direction %ld\n", dwDirection);
+ ok(0, "unexpected direction %d\n", dwDirection);
return E_NOTIMPL;
}
return EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenumFormatEtc);
@@ -322,11 +322,11 @@ static void test_set_clipboard(void)
ULONG ref;
LPDATAOBJECT data1, data2;
hr = DataObjectImpl_CreateText("data1", &data1);
- ok(SUCCEEDED(hr), "Failed to create data1 object: %ld\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create data1 object: %d\n", hr);
if(FAILED(hr))
return;
hr = DataObjectImpl_CreateText("data2", &data2);
- ok(SUCCEEDED(hr), "Failed to create data2 object: %ld\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create data2 object: %d\n", hr);
if(FAILED(hr))
return;
@@ -345,9 +345,9 @@ static void test_set_clipboard(void)
ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard\n");
ref = IDataObject_Release(data1);
- ok(ref == 0, "expected data1 ref=0, got %ld\n", ref);
+ ok(ref == 0, "expected data1 ref=0, got %d\n", ref);
ref = IDataObject_Release(data2);
- ok(ref == 0, "expected data2 ref=0, got %ld\n", ref);
+ ok(ref == 0, "expected data2 ref=0, got %d\n", ref);
}
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index 44f2fb0..b2e9bf9 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -33,7 +33,7 @@ #include "wine/test.h"
/* functions that are not present on all versions of Windows */
HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
+#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
static const CLSID CLSID_non_existent = { 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
static const CLSID CLSID_CDeviceMoniker = { 0x4315d437, 0x5b8c, 0x11d0, { 0xbd, 0x3b, 0x00, 0xa0, 0xc9, 0x11, 0xce, 0x86 } };
@@ -63,7 +63,7 @@ static void test_ProgIDFromCLSID(void)
{
LPWSTR progid;
HRESULT hr = ProgIDFromCLSID(&CLSID_CDeviceMoniker, &progid);
- ok(hr == S_OK, "ProgIDFromCLSID failed with error 0x%08lx\n", hr);
+ ok(hr == S_OK, "ProgIDFromCLSID failed with error 0x%08x\n", hr);
if (hr == S_OK)
{
ok(!lstrcmpiW(progid, devicedotone), "Didn't get expected prog ID\n");
@@ -72,18 +72,18 @@ static void test_ProgIDFromCLSID(void)
progid = (LPWSTR)0xdeadbeef;
hr = ProgIDFromCLSID(&CLSID_non_existent, &progid);
- ok(hr == REGDB_E_CLASSNOTREG, "ProgIDFromCLSID returned %08lx\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "ProgIDFromCLSID returned %08x\n", hr);
ok(progid == NULL, "ProgIDFromCLSID returns with progid %p\n", progid);
hr = ProgIDFromCLSID(&CLSID_CDeviceMoniker, NULL);
- ok(hr == E_INVALIDARG, "ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08x\n", hr);
}
static void test_CLSIDFromProgID(void)
{
CLSID clsid;
HRESULT hr = CLSIDFromProgID(devicedotone, &clsid);
- ok(hr == S_OK, "CLSIDFromProgID failed with error 0x%08lx\n", hr);
+ ok(hr == S_OK, "CLSIDFromProgID failed with error 0x%08x\n", hr);
ok(IsEqualCLSID(&clsid, &CLSID_CDeviceMoniker), "clsid wasn't equal to CLSID_CDeviceMoniker\n");
hr = CLSIDFromString((LPOLESTR)devicedotone, &clsid);
@@ -93,14 +93,14 @@ static void test_CLSIDFromProgID(void)
/* test some failure cases */
hr = CLSIDFromProgID(wszNonExistent, NULL);
- ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n", hr);
hr = CLSIDFromProgID(NULL, &clsid);
- ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n", hr);
memset(&clsid, 0xcc, sizeof(clsid));
hr = CLSIDFromProgID(wszNonExistent, &clsid);
- ok(hr == CO_E_CLASSSTRING, "CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08lx\n", hr);
+ ok(hr == CO_E_CLASSSTRING, "CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08x\n", hr);
ok(IsEqualCLSID(&clsid, &CLSID_NULL), "CLSIDFromProgID should have set clsid to all-zeros on failure\n");
}
@@ -121,7 +121,7 @@ static void test_CoCreateInstance(void)
REFCLSID rclsid = &CLSID_MyComputer;
IUnknown *pUnk = (IUnknown *)0xdeadbeef;
HRESULT hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
- ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
+ ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
ok(pUnk == NULL, "CoCreateInstance should have changed the passed in pointer to NULL, instead of %p\n", pUnk);
OleInitialize(NULL);
@@ -131,18 +131,18 @@ static void test_CoCreateInstance(void)
OleUninitialize();
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
- ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
+ ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
}
static void test_CoGetClassObject(void)
{
IUnknown *pUnk = (IUnknown *)0xdeadbeef;
HRESULT hr = CoGetClassObject(&CLSID_MyComputer, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk);
- ok(hr == CO_E_NOTINITIALIZED, "CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
+ ok(hr == CO_E_NOTINITIALIZED, "CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
ok(pUnk == NULL, "CoGetClassObject should have changed the passed in pointer to NULL, instead of %p\n", pUnk);
hr = CoGetClassObject(&CLSID_MyComputer, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, NULL);
- ok(hr == E_INVALIDARG, "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08x\n", hr);
}
static ATOM register_dummy_class(void)
@@ -258,7 +258,7 @@ #endif
prev_filter = (IMessageFilter *)0xdeadbeef;
hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter);
ok(hr == CO_E_NOT_SUPPORTED,
- "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08lx\n",
+ "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n",
hr);
ok(prev_filter == (IMessageFilter *)0xdeadbeef,
"prev_filter should have been set to %p\n", prev_filter);
@@ -395,7 +395,7 @@ static void test_CoRegisterPSClsid(void)
CLSID clsid;
hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer);
- ok(hr == CO_E_NOTINITIALIZED, "CoRegisterPSClsid should have returened CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
+ ok(hr == CO_E_NOTINITIALIZED, "CoRegisterPSClsid should have returened CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
@@ -410,7 +410,7 @@ static void test_CoRegisterPSClsid(void)
ok_ole_success(hr, "CreateStreamOnHGlobal");
hr = CoMarshalInterface(stream, &IID_IWineTest, (IUnknown *)&Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
- ok(hr == E_NOTIMPL, "CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08lx\n", hr);
+ ok(hr == E_NOTIMPL, "CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08x\n", hr);
IStream_Release(stream);
hr = CoRevokeClassObject(dwRegistrationKey);
@@ -421,7 +421,7 @@ static void test_CoRegisterPSClsid(void)
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoGetPSClsid(&IID_IWineTest, &clsid);
- ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08lx\n", hr);
+ ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08x\n", hr);
CoUninitialize();
}
@@ -433,7 +433,7 @@ static void test_CoGetPSClsid(void)
hr = CoGetPSClsid(&IID_IClassFactory, &clsid);
ok(hr == CO_E_NOTINITIALIZED,
- "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n",
+ "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n",
hr);
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
@@ -443,12 +443,12 @@ static void test_CoGetPSClsid(void)
hr = CoGetPSClsid(&IID_IWineTest, &clsid);
ok(hr == REGDB_E_IIDNOTREG,
- "CoGetPSClsid for random IID returned 0x%08lx instead of REGDB_E_IIDNOTREG\n",
+ "CoGetPSClsid for random IID returned 0x%08x instead of REGDB_E_IIDNOTREG\n",
hr);
hr = CoGetPSClsid(&IID_IClassFactory, NULL);
ok(hr == E_INVALIDARG,
- "CoGetPSClsid for null clsid returned 0x%08lx instead of E_INVALIDARG\n",
+ "CoGetPSClsid for null clsid returned 0x%08x instead of E_INVALIDARG\n",
hr);
CoUninitialize();
diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c
index 482ef1b..0402696 100644
--- a/dlls/ole32/tests/hglobalstream.c
+++ b/dlls/ole32/tests/hglobalstream.c
@@ -28,7 +28,7 @@ #include "objbase.h"
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
+#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
static void test_streamonhglobal(IStream *pStream)
{
@@ -54,7 +54,7 @@ static void test_streamonhglobal(IStream
/* should return S_OK, not S_FALSE */
hr = IStream_Read(pStream, buffer, sizeof(buffer), &read);
ok_ole_success(hr, "IStream_Read");
- ok(read == sizeof(data), "IStream_Read returned read %ld\n", read);
+ ok(read == sizeof(data), "IStream_Read returned read %d\n", read);
/* ignores HighPart */
ull.HighPart = -1;
@@ -69,18 +69,18 @@ static void test_streamonhglobal(IStream
ok_ole_success(hr, "IStream_Revert");
hr = IStream_LockRegion(pStream, ull, ull, LOCK_WRITE);
- ok(hr == STG_E_INVALIDFUNCTION, "IStream_LockRegion should have returned STG_E_INVALIDFUNCTION instead of 0x%08lx\n", hr);
+ ok(hr == STG_E_INVALIDFUNCTION, "IStream_LockRegion should have returned STG_E_INVALIDFUNCTION instead of 0x%08x\n", hr);
hr = IStream_Stat(pStream, &statstg, STATFLAG_DEFAULT);
ok_ole_success(hr, "IStream_Stat");
- ok(statstg.type == STGTY_STREAM, "statstg.type should have been STGTY_STREAM instead of %ld\n", statstg.type);
+ ok(statstg.type == STGTY_STREAM, "statstg.type should have been STGTY_STREAM instead of %d\n", statstg.type);
/* test OOM condition */
ull.HighPart = -1;
ull.LowPart = -1;
hr = IStream_SetSize(pStream, ull);
todo_wine {
- ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08lx\n", hr);
+ ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr);
}
}
diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index 1d8093a..b873b46 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -35,9 +35,9 @@ #include "wine/test.h"
HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
/* helper macros to make tests a bit leaner */
-#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %ld\n", cLocks)
-#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %ld\n", cLocks)
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", hr)
+#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
+#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks)
+#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
static const IID IID_IWineTest =
{
@@ -275,7 +275,7 @@ static void release_host_object(DWORD ti
static void end_host_object(DWORD tid, HANDLE thread)
{
BOOL ret = PostThreadMessage(tid, WM_QUIT, 0, 0);
- ok(ret, "PostThreadMessage failed with error %ld\n", GetLastError());
+ ok(ret, "PostThreadMessage failed with error %d\n", GetLastError());
/* be careful of races - don't return until hosting thread has terminated */
WaitForSingleObject(thread, INFINITE);
CloseHandle(thread);
@@ -291,7 +291,7 @@ static void test_no_marshaler(void)
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
ok_ole_success(hr, CreateStreamOnHGlobal);
hr = CoMarshalInterface(pStream, &IID_IWineTest, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
- ok(hr == E_NOINTERFACE, "CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
+ ok(hr == E_NOINTERFACE, "CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n", hr);
IStream_Release(pStream);
}
@@ -380,7 +380,7 @@ static void test_marshal_and_unmarshal_i
if (pProxy)
{
hr = IClassFactory_CreateInstance(pProxy, NULL, &IID_IUnknown, &dummy);
- ok(hr == RPC_E_DISCONNECTED, "Remote call should have returned RPC_E_DISCONNECTED, instead of 0x%08lx\n", hr);
+ ok(hr == RPC_E_DISCONNECTED, "Remote call should have returned RPC_E_DISCONNECTED, instead of 0x%08x\n", hr);
IClassFactory_Release(pProxy);
}
@@ -918,7 +918,7 @@ static void test_tableweak_marshal_relea
todo_wine
{
ok(hr == CO_E_OBJNOTREG,
- "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08lx instead\n",
+ "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08x instead\n",
hr);
}
IStream_Release(pStream);
@@ -1079,7 +1079,7 @@ static void test_normal_marshal_and_unma
IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL);
hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2);
ok(hr == CO_E_OBJNOTCONNECTED,
- "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08lx\n", hr);
+ "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08x\n", hr);
IStream_Release(pStream);
@@ -1108,14 +1108,14 @@ static void test_hresult_marshaling(void
hr = IStream_Read(pStream, &hr_marshaled, sizeof(HRESULT), NULL);
ok_ole_success(hr, IStream_Read);
- ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08lx instead\n", hr_marshaled);
+ ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled);
hr_marshaled = 0;
IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL);
hr = CoUnmarshalHresult(pStream, &hr_marshaled);
ok_ole_success(hr, CoUnmarshalHresult);
- ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08lx instead\n", hr_marshaled);
+ ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled);
IStream_Release(pStream);
}
@@ -1133,7 +1133,7 @@ static DWORD CALLBACK bad_thread_proc(LP
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy);
if (proxy) IUnknown_Release(proxy);
ok(hr == RPC_E_WRONG_THREAD,
- "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08lx\n",
+ "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08x\n",
hr);
CoUninitialize();
@@ -1288,7 +1288,7 @@ static void test_message_filter(void)
ok_more_than_one_lock();
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy);
- todo_wine { ok(hr == RPC_E_CALL_REJECTED, "Call should have returned RPC_E_CALL_REJECTED, but return 0x%08lx instead\n", hr); }
+ todo_wine { ok(hr == RPC_E_CALL_REJECTED, "Call should have returned RPC_E_CALL_REJECTED, but return 0x%08x instead\n", hr); }
if (proxy) IUnknown_Release(proxy);
proxy = NULL;
@@ -1323,7 +1323,7 @@ static void test_bad_marshal_stream(void
/* try to read beyond end of stream */
hr = CoReleaseMarshalData(pStream);
- ok(hr == STG_E_READFAULT, "Should have failed with STG_E_READFAULT, but returned 0x%08lx instead\n", hr);
+ ok(hr == STG_E_READFAULT, "Should have failed with STG_E_READFAULT, but returned 0x%08x instead\n", hr);
/* now release for real */
IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL);
@@ -1451,7 +1451,7 @@ static void test_proxybuffer(REFIID riid
/* release our reference to the outer unknown object - the PS factory
* buffer will have AddRef's it in the CreateProxy call */
refs = IUnknown_Release((IUnknown *)pUnkOuter);
- ok(refs == 1, "Ref count of outer unknown should have been 1 instead of %ld\n", refs);
+ ok(refs == 1, "Ref count of outer unknown should have been 1 instead of %d\n", refs);
refs = IPSFactoryBuffer_Release(psfb);
#if 0 /* not reliable on native. maybe it leaks references! */
@@ -1459,10 +1459,10 @@ #if 0 /* not reliable on native. maybe i
#endif
refs = IUnknown_Release((IUnknown *)lpvtbl);
- ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
+ ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs);
refs = IRpcProxyBuffer_Release(proxy);
- ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
+ ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs);
}
static void test_stubbuffer(REFIID riid)
@@ -1496,7 +1496,7 @@ #endif
ok_no_locks();
refs = IRpcStubBuffer_Release(stub);
- ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
+ ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs);
}
static HWND hwnd_app;
@@ -1668,13 +1668,13 @@ static void test_freethreadedmarshaldata
if (mshctx == MSHCTX_INPROC)
{
DWORD expected_size = sizeof(DWORD) + sizeof(void *) + sizeof(DWORD) + sizeof(GUID);
- ok(size == expected_size, "size should have been %ld instead of %ld\n", expected_size, size);
+ ok(size == expected_size, "size should have been %d instead of %d\n", expected_size, size);
- ok(*(DWORD *)marshal_data == mshlflags, "expected 0x%lx, but got 0x%lx for mshctx\n", mshlflags, *(DWORD *)marshal_data);
+ ok(*(DWORD *)marshal_data == mshlflags, "expected 0x%x, but got 0x%x for mshctx\n", mshlflags, *(DWORD *)marshal_data);
marshal_data += sizeof(DWORD);
ok(*(void **)marshal_data == ptr, "expected %p, but got %p for mshctx\n", ptr, *(void **)marshal_data);
marshal_data += sizeof(void *);
- ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%lx\n", *(DWORD *)marshal_data);
+ ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%x\n", *(DWORD *)marshal_data);
marshal_data += sizeof(DWORD);
trace("got guid data: {%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
((GUID *)marshal_data)->Data1, ((GUID *)marshal_data)->Data2, ((GUID *)marshal_data)->Data3,
@@ -1683,7 +1683,7 @@ static void test_freethreadedmarshaldata
}
else
{
- ok(size > sizeof(DWORD), "size should have been > sizeof(DWORD), not %ld\n", size);
+ ok(size > sizeof(DWORD), "size should have been > sizeof(DWORD), not %d\n", size);
ok(*(DWORD *)marshal_data == 0x574f454d /* MEOW */,
"marshal data should be filled by standard marshal and start with MEOW signature\n");
}
@@ -1934,7 +1934,7 @@ static void test_out_of_process_com(void
NULL, &IID_IClassFactory, (LPVOID*)&cf);
todo_wine {
ok(hr == REGDB_E_CLASSNOTREG,
- "CoGetClassObject should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
+ "CoGetClassObject should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr);
}
/* Resume the object suspended above ... */
@@ -1952,7 +1952,7 @@ static void test_out_of_process_com(void
ok_no_locks();
hr = IClassFactory_LockServer(cf, TRUE);
- trace("IClassFactory_LockServer returned 0x%08lx\n", hr);
+ trace("IClassFactory_LockServer returned 0x%08x\n", hr);
ok_more_than_one_lock();
@@ -1971,7 +1971,7 @@ static void test_out_of_process_com(void
&IID_IClassFactory, (LPVOID*)&cf);
todo_wine {
ok(hr == CO_E_SERVER_STOPPING,
- "CoGetClassObject should have returned CO_E_SERVER_STOPPING instead of 0x%08lx\n", hr);
+ "CoGetClassObject should have returned CO_E_SERVER_STOPPING instead of 0x%08x\n", hr);
}
hr = CoRevokeClassObject(cookie);
@@ -2021,7 +2021,7 @@ static DWORD CALLBACK get_global_interfa
hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf);
ok(hr == CO_E_NOTINITIALIZED,
- "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED instead of 0x%08lx\n",
+ "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED instead of 0x%08x\n",
hr);
CoInitialize(NULL);
@@ -2094,7 +2094,7 @@ static void test_marshal_CLIPFORMAT(void
CLIPFORMAT_UserMarshal(&flags, buffer, &cf);
wirecf = (wireCLIPFORMAT)buffer;
ok(wirecf->fContext == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", wirecf->fContext);
- ok(wirecf->u.dwValue == cf, "Marshaled value should be 0x%04x instead of 0x%04lx\n", cf, wirecf->u.dwValue);
+ ok(wirecf->u.dwValue == cf, "Marshaled value should be 0x%04x instead of 0x%04x\n", cf, wirecf->u.dwValue);
ok(!memcmp(wirecf+1, cf_marshaled, sizeof(cf_marshaled)), "Marshaled data differs\n");
CLIPFORMAT_UserUnmarshal(&flags, buffer, &cf2);
@@ -2148,7 +2148,7 @@ static void test_marshal_HGLOBAL(void)
buffer = HeapAlloc(GetProcessHeap(), 0, size);
HGLOBAL_UserMarshal(&flags, buffer, &hglobal);
wirehglobal = buffer;
- ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(ULONG *)wirehglobal);
+ ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)wirehglobal);
wirehglobal += sizeof(ULONG);
ok(*(ULONG *)wirehglobal == (ULONG)hglobal, "buffer+4 should be HGLOBAL\n");
HGLOBAL_UserUnmarshal(&flags, buffer, &hglobal2);
@@ -2169,7 +2169,7 @@ static void test_marshal_HGLOBAL(void)
buffer = HeapAlloc(GetProcessHeap(), 0, size);
HGLOBAL_UserMarshal(&flags, buffer, &hglobal);
wirehglobal = buffer;
- ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(ULONG *)wirehglobal);
+ ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)wirehglobal);
wirehglobal += sizeof(ULONG);
ok(*(ULONG *)wirehglobal == (ULONG)hglobal, "buffer+0x4 should be HGLOBAL\n");
wirehglobal += sizeof(ULONG);
@@ -2212,15 +2212,15 @@ static void test_marshal_HENHMETAFILE(vo
buffer = HeapAlloc(GetProcessHeap(), 0, size);
HENHMETAFILE_UserMarshal(&flags, buffer, &hemf);
wirehemf = buffer;
- ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
- ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08lx\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08x\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
- ok(*(DWORD *)wirehemf == (size - 0x10), "wirestgm + 0x8 should be size - 0x10 instead of 0x%08lx\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == (size - 0x10), "wirestgm + 0x8 should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
- ok(*(DWORD *)wirehemf == (size - 0x10), "wirestgm + 0xc should be size - 0x10 instead of 0x%08lx\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == (size - 0x10), "wirestgm + 0xc should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
- ok(*(DWORD *)wirehemf == EMR_HEADER, "wirestgm + 0x10 should be EMR_HEADER instead of %ld\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == EMR_HEADER, "wirestgm + 0x10 should be EMR_HEADER instead of %d\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
/* ... rest of data not tested - refer to tests for GetEnhMetaFileBits
* at this point */
@@ -2239,9 +2239,9 @@ static void test_marshal_HENHMETAFILE(vo
buffer = (unsigned char *)HeapAlloc(GetProcessHeap(), 0, size);
HENHMETAFILE_UserMarshal(&flags, buffer, &hemf);
wirehemf = buffer;
- ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
- ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08lx\n", *(DWORD *)wirehemf);
+ ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08x\n", *(DWORD *)wirehemf);
wirehemf += sizeof(DWORD);
HENHMETAFILE_UserUnmarshal(&flags, buffer, &hemf2);
diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c
index 48b9850..ac2a9c4 100644
--- a/dlls/ole32/tests/moniker.c
+++ b/dlls/ole32/tests/moniker.c
@@ -31,7 +31,7 @@ #include "comcat.h"
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", hr)
+#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
#define COUNTOF(x) (sizeof(x) / sizeof(x[0]))
static const WCHAR wszFileName1[] = {'c',':','\\','w','i','n','d','o','w','s','\\','t','e','s','t','1','.','d','o','c',0};
@@ -105,18 +105,18 @@ static void test_MkParseDisplayName(void
ok_ole_success(hr, CreateBindCtx);
hr = CreateFileMoniker(wszFileName1, &pmk1);
- ok(hr==0, "CreateFileMoniker for file hr=%08lx\n", hr);
+ ok(hr==0, "CreateFileMoniker for file hr=%08x\n", hr);
hr = CreateFileMoniker(wszFileName2, &pmk2);
- ok(hr==0, "CreateFileMoniker for file hr=%08lx\n", hr);
+ ok(hr==0, "CreateFileMoniker for file hr=%08x\n", hr);
hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
- ok(hr==0, "IBindCtx_GetRunningObjectTable hr=%08lx\n", hr);
+ ok(hr==0, "IBindCtx_GetRunningObjectTable hr=%08x\n", hr);
/* Check EnumMoniker before registering */
hr = IRunningObjectTable_EnumRunning(pprot, &spEM1);
- ok(hr==0, "IRunningObjectTable_EnumRunning hr=%08lx\n", hr);
+ ok(hr==0, "IRunningObjectTable_EnumRunning hr=%08x\n", hr);
hr = IEnumMoniker_QueryInterface(spEM1, &IID_IUnknown, (void*) &lpEM1);
/* Register a couple of Monikers and check is ok */
- ok(hr==0, "IEnumMoniker_QueryInterface hr %08lx %p\n", hr, lpEM1);
+ ok(hr==0, "IEnumMoniker_QueryInterface hr %08x %p\n", hr, lpEM1);
hr = MK_E_NOOBJECT;
matchCnt = count_moniker_matches(pbc, spEM1);
@@ -124,18 +124,18 @@ static void test_MkParseDisplayName(void
grflags= grflags | ROTFLAGS_REGISTRATIONKEEPSALIVE;
hr = IRunningObjectTable_Register(pprot, grflags, lpEM1, pmk1, &pdwReg1);
- ok(hr==0, "IRunningObjectTable_Register hr=%08lx %p %08lx %p %p %ld\n",
+ ok(hr==0, "IRunningObjectTable_Register hr=%08x %p %08x %p %p %d\n",
hr, pprot, grflags, lpEM1, pmk1, pdwReg1);
trace("IROT::Register\n");
grflags=0;
grflags= grflags | ROTFLAGS_REGISTRATIONKEEPSALIVE;
hr = IRunningObjectTable_Register(pprot, grflags, lpEM1, pmk2, &pdwReg2);
- ok(hr==0, "IRunningObjectTable_Register hr=%08lx %p %08lx %p %p %ld\n", hr,
+ ok(hr==0, "IRunningObjectTable_Register hr=%08x %p %08x %p %p %d\n", hr,
pprot, grflags, lpEM1, pmk2, pdwReg2);
hr = IRunningObjectTable_EnumRunning(pprot, &spEM2);
- ok(hr==0, "IRunningObjectTable_EnumRunning hr=%08lx\n", hr);
+ ok(hr==0, "IRunningObjectTable_EnumRunning hr=%08x\n", hr);
matchCnt = count_moniker_matches(pbc, spEM2);
ok(matchCnt==2, "Number of matches should be equal to 2 not %i\n", matchCnt);
@@ -323,7 +323,7 @@ static void test_moniker(
IBindCtx *bindctx;
hr = IMoniker_IsDirty(moniker);
- ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", testname, hr);
+ ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname, hr);
/* Display Name */
@@ -338,7 +338,7 @@ static void test_moniker(
IBindCtx_Release(bindctx);
hr = IMoniker_IsDirty(moniker);
- ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", testname, hr);
+ ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname, hr);
/* IROTData::GetComparisonData test */
@@ -352,7 +352,7 @@ static void test_moniker(
/* first check we have the right amount of data */
ok(moniker_size == sizeof_expected_moniker_comparison_data,
- "%s: Size of comparison data differs (expected %d, actual %ld)\n",
+ "%s: Size of comparison data differs (expected %d, actual %d)\n",
testname, sizeof_expected_moniker_comparison_data, moniker_size);
/* then do a byte-by-byte comparison */
@@ -395,7 +395,7 @@ static void test_moniker(
/* first check we have the right amount of data */
ok(moniker_size == sizeof_expected_moniker_saved_data,
- "%s: Size of saved data differs (expected %d, actual %ld)\n",
+ "%s: Size of saved data differs (expected %d, actual %d)\n",
testname, sizeof_expected_moniker_saved_data, moniker_size);
/* then do a byte-by-byte comparison */
@@ -441,7 +441,7 @@ static void test_moniker(
/* first check we have the right amount of data */
ok(moniker_size == sizeof_expected_moniker_marshal_data,
- "%s: Size of marshaled data differs (expected %d, actual %ld)\n",
+ "%s: Size of marshaled data differs (expected %d, actual %d)\n",
testname, sizeof_expected_moniker_marshal_data, moniker_size);
/* then do a byte-by-byte comparison */
@@ -506,7 +506,7 @@ static void test_class_moniker(void)
ok_ole_success(hr, IMoniker_Hash);
ok(hash == CLSID_StdComponentCategoriesMgr.Data1,
- "Hash value != Data1 field of clsid, instead was 0x%08lx\n",
+ "Hash value != Data1 field of clsid, instead was 0x%08x\n",
hash);
/* IsSystemMoniker test */
@@ -515,7 +515,7 @@ static void test_class_moniker(void)
ok_ole_success(hr, IMoniker_IsSystemMoniker);
ok(moniker_type == MKSYS_CLASSMONIKER,
- "dwMkSys != MKSYS_CLASSMONIKER, instead was 0x%08lx\n",
+ "dwMkSys != MKSYS_CLASSMONIKER, instead was 0x%08x\n",
moniker_type);
hr = CreateBindCtx(0, &bindctx);
@@ -523,10 +523,10 @@ static void test_class_moniker(void)
/* IsRunning test */
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL);
- ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx\n", hr);
+ ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime);
- ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx\n", hr);
+ ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08x\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
ok_ole_success(hr, IMoniker_BindToStorage);
@@ -635,7 +635,7 @@ static void test_item_moniker(void)
ok_ole_success(hr, IMoniker_Hash);
ok(hash == 0x73c,
- "Hash value != 0x73c, instead was 0x%08lx\n",
+ "Hash value != 0x73c, instead was 0x%08x\n",
hash);
/* IsSystemMoniker test */
@@ -644,7 +644,7 @@ static void test_item_moniker(void)
ok_ole_success(hr, IMoniker_IsSystemMoniker);
ok(moniker_type == MKSYS_ITEMMONIKER,
- "dwMkSys != MKSYS_ITEMMONIKER, instead was 0x%08lx\n",
+ "dwMkSys != MKSYS_ITEMMONIKER, instead was 0x%08x\n",
moniker_type);
hr = CreateBindCtx(0, &bindctx);
@@ -652,13 +652,13 @@ static void test_item_moniker(void)
/* IsRunning test */
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL);
- ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n", hr);
+ ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
- ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
- ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n", hr);
IBindCtx_Release(bindctx);
@@ -695,18 +695,18 @@ static void test_anti_moniker(void)
hr = IMoniker_Hash(moniker, &hash);
ok_ole_success(hr, IMoniker_Hash);
ok(hash == 0x80000001,
- "Hash value != 0x80000001, instead was 0x%08lx\n",
+ "Hash value != 0x80000001, instead was 0x%08x\n",
hash);
/* IsSystemMoniker test */
hr = IMoniker_IsSystemMoniker(moniker, &moniker_type);
ok_ole_success(hr, IMoniker_IsSystemMoniker);
ok(moniker_type == MKSYS_ANTIMONIKER,
- "dwMkSys != MKSYS_ANTIMONIKER, instead was 0x%08lx\n",
+ "dwMkSys != MKSYS_ANTIMONIKER, instead was 0x%08x\n",
moniker_type);
hr = IMoniker_Inverse(moniker, &inverse);
- ok(hr == MK_E_NOINVERSE, "IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08lx\n", hr);
+ ok(hr == MK_E_NOINVERSE, "IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08x\n", hr);
ok(inverse == NULL, "inverse should have been set to NULL instead of %p\n", inverse);
hr = CreateBindCtx(0, &bindctx);
@@ -714,16 +714,16 @@ static void test_anti_moniker(void)
/* IsRunning test */
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL);
- ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n", hr);
+ ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime);
- ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08lx\n", hr);
+ ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
- ok(hr == E_NOTIMPL, "IMoniker_BindToObject should return E_NOTIMPL, not 0x%08lx\n", hr);
+ ok(hr == E_NOTIMPL, "IMoniker_BindToObject should return E_NOTIMPL, not 0x%08x\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
- ok(hr == E_NOTIMPL, "IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08lx\n", hr);
+ ok(hr == E_NOTIMPL, "IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08x\n", hr);
IBindCtx_Release(bindctx);
@@ -767,7 +767,7 @@ static void test_generic_composite_monik
ok_ole_success(hr, IMoniker_Hash);
ok(hash == 0xd87,
- "Hash value != 0xd87, instead was 0x%08lx\n",
+ "Hash value != 0xd87, instead was 0x%08x\n",
hash);
/* IsSystemMoniker test */
@@ -776,7 +776,7 @@ static void test_generic_composite_monik
ok_ole_success(hr, IMoniker_IsSystemMoniker);
ok(moniker_type == MKSYS_GENERICCOMPOSITE,
- "dwMkSys != MKSYS_GENERICCOMPOSITE, instead was 0x%08lx\n",
+ "dwMkSys != MKSYS_GENERICCOMPOSITE, instead was 0x%08x\n",
moniker_type);
hr = CreateBindCtx(0, &bindctx);
@@ -785,18 +785,18 @@ static void test_generic_composite_monik
/* IsRunning test */
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL);
todo_wine
- ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n", hr);
+ ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime);
- ok(hr == MK_E_NOTBINDABLE, "IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08lx\n", hr);
+ ok(hr == MK_E_NOTBINDABLE, "IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08x\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
todo_wine
- ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n", hr);
todo_wine
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
- ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr);
IBindCtx_Release(bindctx);
diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c
index fe3a6a2..611b473 100644
--- a/dlls/ole32/tests/ole2.c
+++ b/dlls/ole32/tests/ole2.c
@@ -29,7 +29,7 @@ #include "shlguid.h"
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
+#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
static IPersistStorage OleObjectPersistStg;
static IOleCache *cache;
diff --git a/dlls/ole32/tests/propvariant.c b/dlls/ole32/tests/propvariant.c
index 3100bb0..c811eaa 100644
--- a/dlls/ole32/tests/propvariant.c
+++ b/dlls/ole32/tests/propvariant.c
@@ -167,7 +167,7 @@ static void test_validtypes(void)
hr = PropVariantClear(&propvar);
expected_result = (valid_types[i].simple <= version ? TRUE : FALSE);
ok(expected_result == !(hr == STG_E_INVALIDPARAMETER),
- "PropVariantClear(%s) should have returned 0x%08lx, but returned 0x%08lx\n",
+ "PropVariantClear(%s) should have returned 0x%08x, but returned 0x%08x\n",
wine_vtypes[i],
expected_result ? S_OK : STG_E_INVALIDPARAMETER, hr);
@@ -175,7 +175,7 @@ static void test_validtypes(void)
hr = PropVariantClear(&propvar);
expected_result = (valid_types[i].with_array <= version ? TRUE : FALSE);
ok(expected_result == !(hr == STG_E_INVALIDPARAMETER),
- "PropVariantClear(%s|VT_ARRAY) should have returned 0x%08lx, but returned 0x%08lx\n",
+ "PropVariantClear(%s|VT_ARRAY) should have returned 0x%08x, but returned 0x%08x\n",
wine_vtypes[i],
expected_result ? S_OK : STG_E_INVALIDPARAMETER, hr);
@@ -183,7 +183,7 @@ static void test_validtypes(void)
hr = PropVariantClear(&propvar);
expected_result = (valid_types[i].with_vector <= version ? TRUE : FALSE);
ok(expected_result == !(hr == STG_E_INVALIDPARAMETER),
- "PropVariantClear(%s|VT_VECTOR) should have returned 0x%08lx, but returned 0x%08lx\n",
+ "PropVariantClear(%s|VT_VECTOR) should have returned 0x%08x, but returned 0x%08x\n",
wine_vtypes[i],
expected_result ? S_OK : STG_E_INVALIDPARAMETER, hr);
@@ -191,7 +191,7 @@ static void test_validtypes(void)
hr = PropVariantClear(&propvar);
expected_result = (valid_types[i].byref <= version ? TRUE : FALSE);
ok(expected_result == !(hr == STG_E_INVALIDPARAMETER),
- "PropVariantClear(%s|VT_BYREF) should have returned 0x%08lx, but returned 0x%08lx\n",
+ "PropVariantClear(%s|VT_BYREF) should have returned 0x%08x, but returned 0x%08x\n",
wine_vtypes[i],
expected_result ? S_OK : STG_E_INVALIDPARAMETER, hr);
}
diff --git a/dlls/ole32/tests/stg_prop.c b/dlls/ole32/tests/stg_prop.c
index 0f97995..59cae8e 100644
--- a/dlls/ole32/tests/stg_prop.c
+++ b/dlls/ole32/tests/stg_prop.c
@@ -65,7 +65,7 @@ static void testProps(void)
hr = StgCreateDocfile(filename,
STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage);
- ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr);
if(!pStgCreatePropSetStg)
{
@@ -74,18 +74,18 @@ static void testProps(void)
return;
}
hr = pStgCreatePropSetStg(storage, 0, &propSetStorage);
- ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr);
hr = IPropertySetStorage_Create(propSetStorage,
&FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI,
STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE,
&propertyStorage);
- ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr);
hr = IPropertyStorage_WriteMultiple(propertyStorage, 0, NULL, NULL, 0);
- ok(hr == S_OK, "WriteMultiple with 0 args failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple with 0 args failed: 0x%08x\n", hr);
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, NULL, NULL, 0);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
/* test setting one that I can't set */
spec.ulKind = PRSPEC_PROPID;
@@ -95,7 +95,7 @@ static void testProps(void)
U(var).lVal = 1;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
ok(hr == STG_E_INVALIDPARAMETER,
- "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
+ "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr);
/* test setting one by name with an invalid propidNameFirst */
spec.ulKind = PRSPEC_LPWSTR;
@@ -103,7 +103,7 @@ static void testProps(void)
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var,
PID_DICTIONARY);
ok(hr == STG_E_INVALIDPARAMETER,
- "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
+ "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr);
/* test setting behavior (case-sensitive) */
spec.ulKind = PRSPEC_PROPID;
@@ -111,14 +111,14 @@ static void testProps(void)
U(var).lVal = 1;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
ok(hr == STG_E_INVALIDPARAMETER,
- "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
+ "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr);
/* set one by value.. */
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PID_FIRST_USABLE;
U(var).lVal = 1;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* set one by name */
spec.ulKind = PRSPEC_LPWSTR;
@@ -126,7 +126,7 @@ static void testProps(void)
U(var).lVal = 2;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var,
PID_FIRST_USABLE);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* set a string value */
spec.ulKind = PRSPEC_PROPID;
@@ -134,7 +134,7 @@ static void testProps(void)
var.vt = VT_LPSTR;
U(var).pszVal = (LPSTR)val;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* set a clipboard value */
spec.ulKind = PRSPEC_PROPID;
@@ -145,19 +145,19 @@ static void testProps(void)
clipdata.pClipData = clipcontent;
U(var).pclipdata = &clipdata;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* check reading */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 0, NULL, NULL);
- ok(hr == S_FALSE, "ReadMultiple with 0 args failed: 0x%08lx\n", hr);
+ ok(hr == S_FALSE, "ReadMultiple with 0 args failed: 0x%08x\n", hr);
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, NULL, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
/* read by propid */
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PID_FIRST_USABLE;
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I4 && U(var).lVal == 1,
"Didn't get expected type or value for property (got type %d, value %ld)\n",
var.vt, U(var).lVal);
@@ -165,7 +165,7 @@ static void testProps(void)
spec.ulKind = PRSPEC_LPWSTR;
U(spec).lpwstr = (LPOLESTR)propName;
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I4 && U(var).lVal == 2,
"Didn't get expected type or value for property (got type %d, value %ld)\n",
var.vt, U(var).lVal);
@@ -173,7 +173,7 @@ static void testProps(void)
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PIDSI_AUTHOR;
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_LPSTR && !lstrcmpA(U(var).pszVal, val),
"Didn't get expected type or value for property (got type %d, value %s)\n",
var.vt, U(var).pszVal);
@@ -182,7 +182,7 @@ static void testProps(void)
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PIDSI_THUMBNAIL;
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(SUCCEEDED(hr), "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(SUCCEEDED(hr), "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_CF, "variant type wrong\n");
ok(U(var).pclipdata->ulClipFmt == CF_ENHMETAFILE,
"clipboard type wrong\n");
@@ -194,54 +194,54 @@ static void testProps(void)
/* check deleting */
hr = IPropertyStorage_DeleteMultiple(propertyStorage, 0, NULL);
- ok(hr == S_OK, "DeleteMultiple with 0 args failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "DeleteMultiple with 0 args failed: 0x%08x\n", hr);
hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
/* contrary to what the docs say, you can't delete the dictionary */
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PID_DICTIONARY;
hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, &spec);
ok(hr == STG_E_INVALIDPARAMETER,
- "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
+ "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr);
/* now delete the first value.. */
U(spec).propid = PID_FIRST_USABLE;
hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, &spec);
- ok(hr == S_OK, "DeleteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "DeleteMultiple failed: 0x%08x\n", hr);
/* and check that it's no longer readable */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08lx\n", hr);
+ ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08x\n", hr);
hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT);
- ok(hr == S_OK, "Commit failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "Commit failed: 0x%08x\n", hr);
/* check reverting */
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PID_FIRST_USABLE;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
hr = IPropertyStorage_Revert(propertyStorage);
- ok(hr == S_OK, "Revert failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "Revert failed: 0x%08x\n", hr);
/* now check that it's still not there */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08lx\n", hr);
+ ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08x\n", hr);
/* set an integer value again */
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PID_FIRST_USABLE;
var.vt = VT_I4;
U(var).lVal = 1;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* commit it */
hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT);
- ok(hr == S_OK, "Commit failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "Commit failed: 0x%08x\n", hr);
/* set it to a string value */
var.vt = VT_LPSTR;
U(var).pszVal = (LPSTR)val;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* revert it */
hr = IPropertyStorage_Revert(propertyStorage);
- ok(hr == S_OK, "Revert failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "Revert failed: 0x%08x\n", hr);
/* Oddly enough, there's no guarantee that a successful revert actually
* implies the value wasn't saved. Maybe transactional mode needs to be
* used for that?
@@ -257,27 +257,27 @@ static void testProps(void)
/* now open it again */
hr = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE,
NULL, 0, &storage);
- ok(hr == S_OK, "StgOpenStorage failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgOpenStorage failed: 0x%08x\n", hr);
hr = pStgCreatePropSetStg(storage, 0, &propSetStorage);
- ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr);
hr = IPropertySetStorage_Open(propSetStorage, &FMTID_SummaryInformation,
STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage);
- ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr);
/* check properties again */
spec.ulKind = PRSPEC_LPWSTR;
U(spec).lpwstr = (LPOLESTR)propName;
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I4 && U(var).lVal == 2,
"Didn't get expected type or value for property (got type %d, value %ld)\n",
var.vt, U(var).lVal);
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PIDSI_AUTHOR;
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_LPSTR && !lstrcmpA(U(var).pszVal, val),
"Didn't get expected type or value for property (got type %d, value %s)\n",
var.vt, U(var).pszVal);
@@ -308,7 +308,7 @@ static void testCodepage(void)
hr = StgCreateDocfile(fileName,
STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage);
- ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr);
if(!pStgCreatePropSetStg)
{
@@ -317,39 +317,39 @@ static void testCodepage(void)
return;
}
hr = pStgCreatePropSetStg(storage, 0, &propSetStorage);
- ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr);
hr = IPropertySetStorage_Create(propSetStorage,
&FMTID_SummaryInformation, NULL, PROPSETFLAG_DEFAULT,
STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE,
&propertyStorage);
- ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr);
PropVariantInit(&var);
spec.ulKind = PRSPEC_PROPID;
U(spec).propid = PID_CODEPAGE;
/* check code page before it's been explicitly set */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I2 && U(var).iVal == 1200,
"Didn't get expected type or value for property\n");
/* Set the code page to ascii */
var.vt = VT_I2;
U(var).iVal = 1252;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* check code page */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I2 && U(var).iVal == 1252,
"Didn't get expected type or value for property\n");
/* Set code page to Unicode */
U(var).iVal = 1200;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* check code page */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I2 && U(var).iVal == 1200,
"Didn't get expected type or value for property\n");
/* Set a string value */
@@ -358,9 +358,9 @@ static void testCodepage(void)
var.vt = VT_LPSTR;
U(var).pszVal = aval;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, "hi"),
"Didn't get expected type or value for property\n");
/* This seemingly non-sensical test is to show that the string is indeed
@@ -370,9 +370,9 @@ static void testCodepage(void)
*/
U(var).pszVal = (LPSTR)wval;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, "h"),
"Didn't get expected type or value for property\n");
/* now that a property's been set, you can't change the code page */
@@ -382,7 +382,7 @@ static void testCodepage(void)
U(var).iVal = 1200;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
ok(hr == STG_E_INVALIDPARAMETER,
- "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
+ "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr);
IPropertyStorage_Release(propertyStorage);
IPropertySetStorage_Release(propSetStorage);
@@ -393,29 +393,29 @@ static void testCodepage(void)
/* same tests, but with PROPSETFLAG_ANSI */
hr = StgCreateDocfile(fileName,
STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage);
- ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr);
hr = pStgCreatePropSetStg(storage, 0, &propSetStorage);
- ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr);
hr = IPropertySetStorage_Create(propSetStorage,
&FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI,
STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE,
&propertyStorage);
- ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr);
/* check code page before it's been explicitly set */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I2 && U(var).iVal == 1252,
"Didn't get expected type or value for property\n");
/* Set code page to Unicode */
U(var).iVal = 1200;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* check code page */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_I2 && U(var).iVal == 1200,
"Didn't get expected type or value for property\n");
/* This test is commented out for documentation. It fails under Wine,
@@ -427,7 +427,7 @@ static void testCodepage(void)
/* Set code page to 950 (Traditional Chinese) */
U(var).iVal = 950;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* Try writing an invalid string: lead byte 0x81 is unused in Traditional
* Chinese.
*/
@@ -436,10 +436,10 @@ static void testCodepage(void)
var.vt = VT_LPSTR;
U(var).pszVal = (LPSTR)strVal;
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
- ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
/* Check returned string */
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
- ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, (LPCSTR)strVal),
"Didn't get expected type or value for property\n");
}
@@ -467,23 +467,23 @@ static void testFmtId(void)
if (pFmtIdToPropStgName) {
hr = pFmtIdToPropStgName(NULL, name);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
hr = pFmtIdToPropStgName(&FMTID_SummaryInformation, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
hr = pFmtIdToPropStgName(&FMTID_SummaryInformation, name);
- ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr);
ok(!memcmp(name, szSummaryInfo, (lstrlenW(szSummaryInfo) + 1) *
sizeof(WCHAR)), "Got wrong name for FMTID_SummaryInformation\n");
hr = pFmtIdToPropStgName(&FMTID_DocSummaryInformation, name);
- ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr);
ok(!memcmp(name, szDocSummaryInfo, (lstrlenW(szDocSummaryInfo) + 1) *
sizeof(WCHAR)), "Got wrong name for FMTID_DocSummaryInformation\n");
hr = pFmtIdToPropStgName(&FMTID_UserDefinedProperties, name);
- ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr);
ok(!memcmp(name, szDocSummaryInfo, (lstrlenW(szDocSummaryInfo) + 1) *
sizeof(WCHAR)), "Got wrong name for FMTID_DocSummaryInformation\n");
hr = pFmtIdToPropStgName(&IID_IPropertySetStorage, name);
- ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr);
ok(!memcmp(name, szIID_IPropSetStg, (lstrlenW(szIID_IPropSetStg) + 1) *
sizeof(WCHAR)), "Got wrong name for IID_IPropertySetStorage\n");
}
@@ -491,35 +491,35 @@ static void testFmtId(void)
if(pPropStgNameToFmtId) {
/* test args first */
hr = pPropStgNameToFmtId(NULL, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
hr = pPropStgNameToFmtId(NULL, &fmtid);
- ok(hr == STG_E_INVALIDNAME, "Expected STG_E_INVALIDNAME, got 0x%08lx\n",
+ ok(hr == STG_E_INVALIDNAME, "Expected STG_E_INVALIDNAME, got 0x%08x\n",
hr);
hr = pPropStgNameToFmtId(szDocSummaryInfo, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr);
/* test the known format IDs */
hr = pPropStgNameToFmtId(szSummaryInfo, &fmtid);
- ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr);
ok(!memcmp(&fmtid, &FMTID_SummaryInformation, sizeof(fmtid)),
"Got unexpected FMTID, expected FMTID_SummaryInformation\n");
hr = pPropStgNameToFmtId(szDocSummaryInfo, &fmtid);
- ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr);
ok(!memcmp(&fmtid, &FMTID_DocSummaryInformation, sizeof(fmtid)),
"Got unexpected FMTID, expected FMTID_DocSummaryInformation\n");
/* test another GUID */
hr = pPropStgNameToFmtId(szIID_IPropSetStg, &fmtid);
- ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr);
ok(!memcmp(&fmtid, &IID_IPropertySetStorage, sizeof(fmtid)),
"Got unexpected FMTID, expected IID_IPropertySetStorage\n");
/* now check case matching */
CharUpperW(szDocSummaryInfo + 1);
hr = pPropStgNameToFmtId(szDocSummaryInfo, &fmtid);
- ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr);
ok(!memcmp(&fmtid, &FMTID_DocSummaryInformation, sizeof(fmtid)),
"Got unexpected FMTID, expected FMTID_DocSummaryInformation\n");
CharUpperW(szIID_IPropSetStg + 1);
hr = pPropStgNameToFmtId(szIID_IPropSetStg, &fmtid);
- ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr);
+ ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr);
ok(!memcmp(&fmtid, &IID_IPropertySetStorage, sizeof(fmtid)),
"Got unexpected FMTID, expected IID_IPropertySetStorage\n");
}
diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c
index 65df045..667e581 100644
--- a/dlls/ole32/tests/storage32.c
+++ b/dlls/ole32/tests/storage32.c
@@ -253,7 +253,7 @@ static void test_storage_stream(void)
r = IStorage_CreateStream(stg, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm );
ok(r==STG_E_INVALIDNAME, "IStorage->CreateStream wrong error\n");
r = IStorage_CreateStream(stg, longname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm );
- ok(r==STG_E_INVALIDNAME, "IStorage->CreateStream wrong error, got %ld GetLastError()=%ld\n", r, GetLastError());
+ ok(r==STG_E_INVALIDNAME, "IStorage->CreateStream wrong error, got %d GetLastError()=%d\n", r, GetLastError());
r = IStorage_CreateStream(stg, stmname, STGM_READWRITE, 0, 0, &stm );
ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n");
r = IStorage_CreateStream(stg, stmname, STGM_READ, 0, 0, &stm );
@@ -391,7 +391,7 @@ static void test_open_storage(void)
/* try opening a nonexistent file - it should create it */
stgm = STGM_DIRECT | STGM_SHARE_EXCLUSIVE | STGM_READWRITE;
r = StgOpenStorage( filename, NULL, stgm, NULL, 0, &stg);
- ok(r==S_OK, "StgOpenStorage failed: 0x%08lx\n", r);
+ ok(r==S_OK, "StgOpenStorage failed: 0x%08x\n", r);
if (r==S_OK) IStorage_Release(stg);
ok(is_existing_file(filename), "StgOpenStorage didn't create a file\n");
DeleteFileW(filename);
@@ -696,10 +696,10 @@ static void test_storage_refcount(void)
ok (r == STG_E_REVERTED, "stat should fail\n");
r = IStream_Write( stm, "Test string", strlen("Test string"), NULL);
- ok (r == STG_E_REVERTED, "IStream_Write should return STG_E_REVERTED instead of 0x%08lx\n", r);
+ ok (r == STG_E_REVERTED, "IStream_Write should return STG_E_REVERTED instead of 0x%08x\n", r);
r = IStream_Read( stm, buffer, sizeof(buffer), NULL);
- ok (r == STG_E_REVERTED, "IStream_Read should return STG_E_REVERTED instead of 0x%08lx\n", r);
+ ok (r == STG_E_REVERTED, "IStream_Read should return STG_E_REVERTED instead of 0x%08x\n", r);
r = IStream_Release(stm);
ok (r == 0, "stream not released\n");
@@ -707,21 +707,21 @@ static void test_storage_refcount(void)
/* tests that STGM_PRIORITY doesn't prevent readwrite access from other
* StgOpenStorage calls in transacted mode */
r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stgprio);
- ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r);
+ ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r);
todo_wine {
/* non-transacted mode read/write fails */
r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg);
- ok(r==STG_E_LOCKVIOLATION, "StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08lx\n", r);
+ ok(r==STG_E_LOCKVIOLATION, "StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08x\n", r);
}
/* non-transacted mode read-only succeeds */
r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_WRITE|STGM_READ, NULL, 0, &stg);
- ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r);
+ ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r);
IStorage_Release(stg);
r = StgOpenStorage( filename, NULL, STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE, NULL, 0, &stg);
- ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r);
+ ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r);
if(stg)
{
static const WCHAR stgname[] = { ' ',' ',' ','2','9',0 };
@@ -732,40 +732,40 @@ static void test_storage_refcount(void)
STATSTG statstg;
r = IStorage_Stat( stg, &statstg, STATFLAG_NONAME );
- ok(r == S_OK, "Stat should have succeded instead of returning 0x%08lx\n", r);
- ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %ld\n", statstg.type);
- ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %ld\n", U(statstg.cbSize).LowPart);
- ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %ld\n", U(statstg.cbSize).HighPart);
+ ok(r == S_OK, "Stat should have succeded instead of returning 0x%08x\n", r);
+ ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type);
+ ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart);
+ ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart);
ok(statstg.grfMode == (STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE),
- "Statstg grfMode should have been 0x10022 instead of 0x%lx\n", statstg.grfMode);
- ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %ld\n", statstg.grfLocksSupported);
+ "Statstg grfMode should have been 0x10022 instead of 0x%x\n", statstg.grfMode);
+ ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported);
ok(IsEqualCLSID(&statstg.clsid, &test_stg_cls), "Statstg clsid is not test_stg_cls\n");
- ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %ld\n", statstg.grfStateBits);
- ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %ld\n", statstg.reserved);
+ ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits);
+ ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved);
r = IStorage_CreateStorage( stg, stgname, STGM_SHARE_EXCLUSIVE, 0, 0, &stg2 );
- ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08lx\n", r);
+ ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08x\n", r);
r = IStorage_Stat( stg2, &statstg, STATFLAG_DEFAULT );
- ok(r == S_OK, "Stat should have succeded instead of returning 0x%08lx\n", r);
+ ok(r == S_OK, "Stat should have succeded instead of returning 0x%08x\n", r);
ok(!lstrcmpW(statstg.pwcsName, stgname),
"Statstg pwcsName should have been the name the storage was created with\n");
- ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %ld\n", statstg.type);
- ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %ld\n", U(statstg.cbSize).LowPart);
- ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %ld\n", U(statstg.cbSize).HighPart);
+ ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type);
+ ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart);
+ ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart);
ok(statstg.grfMode == STGM_SHARE_EXCLUSIVE,
- "Statstg grfMode should have been STGM_SHARE_EXCLUSIVE instead of 0x%lx\n", statstg.grfMode);
- ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %ld\n", statstg.grfLocksSupported);
+ "Statstg grfMode should have been STGM_SHARE_EXCLUSIVE instead of 0x%x\n", statstg.grfMode);
+ ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported);
ok(IsEqualCLSID(&statstg.clsid, &CLSID_NULL), "Statstg clsid is not CLSID_NULL\n");
- ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %ld\n", statstg.grfStateBits);
- ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %ld\n", statstg.reserved);
+ ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits);
+ ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved);
CoTaskMemFree(statstg.pwcsName);
r = IStorage_CreateStorage( stg2, stgname2, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, 0, &stg3 );
- ok(r == STG_E_ACCESSDENIED, "CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08lx\n", r);
+ ok(r == STG_E_ACCESSDENIED, "CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08x\n", r);
r = IStorage_CreateStream( stg2, stmname2, STGM_CREATE|STGM_SHARE_EXCLUSIVE, 0, 0, &stm );
- ok(r == STG_E_ACCESSDENIED, "CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08lx\n", r);
+ ok(r == STG_E_ACCESSDENIED, "CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08x\n", r);
IStorage_Release(stg2);
@@ -892,17 +892,17 @@ static void test_transact(void)
return;
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_DENY_NONE|STGM_READ, 0, &stm );
- ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08lx\n", r);
+ ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08x\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm );
- ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08lx\n", r);
+ ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm );
- ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08lx\n", r);
+ ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r);
todo_wine {
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm );
- ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08lx\n", r);
+ ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r);
}
if (stm)
More information about the wine-patches
mailing list