Commit a7421744 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

ole32/tests: Enable compilation with long types.

parent 3aa87091
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = ole32.dll
IMPORTS = oleaut32 ole32 user32 uuid gdi32 advapi32
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -101,30 +101,30 @@ static void test_olestream(void)
ole_stream_header_t header;
hr = create_storage(&stg);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IStorage_OpenStream(stg, olestream, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stm);
ok(hr == STG_E_FILENOTFOUND, "got %08x\n", hr);
ok(hr == STG_E_FILENOTFOUND, "got %08lx\n", hr);
hr = OleCreateDefaultHandler(&non_existent_class, 0, &IID_IOleObject, (void**)&ole_obj);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IOleObject_QueryInterface(ole_obj, &IID_IPersistStorage, (void**)&persist);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_InitNew(persist, stg);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IStorage_OpenStream(stg, olestream, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stm);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IStream_Read(stm, &header, sizeof(header), &read);
ok(hr == S_OK, "got %08x\n", hr);
ok(read == sizeof(header), "read %d\n", read);
ok(header.version == 0x02000001, "got version %08x\n", header.version);
ok(header.flags == 0x0, "got flags %08x\n", header.flags);
ok(header.link_update_opt == 0x0, "got link update option %08x\n", header.link_update_opt);
ok(header.res == 0x0, "got reserved %08x\n", header.res);
ok(header.moniker_size == 0x0, "got moniker size %08x\n", header.moniker_size);
ok(hr == S_OK, "got %08lx\n", hr);
ok(read == sizeof(header), "read %ld\n", read);
ok(header.version == 0x02000001, "got version %08lx\n", header.version);
ok(header.flags == 0x0, "got flags %08lx\n", header.flags);
ok(header.link_update_opt == 0x0, "got link update option %08lx\n", header.link_update_opt);
ok(header.res == 0x0, "got reserved %08lx\n", header.res);
ok(header.moniker_size == 0x0, "got moniker size %08lx\n", header.moniker_size);
IStream_Release(stm);
......@@ -247,17 +247,17 @@ static void test_default_handler_run(void)
hres = CoRegisterClassObject(&test_server_clsid, (IUnknown*)&ClassFactory,
CLSCTX_INPROC_SERVER, 0, &class_reg);
ok(hres == S_OK, "CoRegisterClassObject failed: %x\n", hres);
ok(hres == S_OK, "CoRegisterClassObject failed: %lx\n", hres);
hres = OleCreateDefaultHandler(&test_server_clsid, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "OleCreateDefaultHandler failed: %x\n", hres);
ok(hres == S_OK, "OleCreateDefaultHandler failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&ro);
ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %x\n", hres);
ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %lx\n", hres);
IUnknown_Release(unk);
hres = IRunnableObject_Run(ro, NULL);
ok(hres == REGDB_E_CLASSNOTREG, "Run returned: %x, expected REGDB_E_CLASSNOTREG\n", hres);
ok(hres == REGDB_E_CLASSNOTREG, "Run returned: %lx, expected REGDB_E_CLASSNOTREG\n", hres);
IRunnableObject_Release(ro);
SET_EXPECT(CF_QueryInterface_IMarshal);
......@@ -266,28 +266,28 @@ static void test_default_handler_run(void)
hres = CoRegisterClassObject(&test_server_clsid, (IUnknown*)&ClassFactory,
CLSCTX_LOCAL_SERVER, 0, &class_reg);
ok(hres == S_OK, "CoRegisterClassObject failed: %x\n", hres);
ok(hres == S_OK, "CoRegisterClassObject failed: %lx\n", hres);
hres = OleCreateDefaultHandler(&test_server_clsid, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "OleCreateDefaultHandler failed: %x\n", hres);
ok(hres == S_OK, "OleCreateDefaultHandler failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj);
ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %lx\n", hres);
hres = IOleObject_QueryInterface(oleobj, &IID_IPersistStorage, (void**)&persist);
ok(hres == S_OK, "QueryInterface(IID_IPersistStorage) failed: %x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IPersistStorage) failed: %lx\n", hres);
IPersistStorage_Release(persist);
IOleObject_Release(oleobj);
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&ro);
ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %x\n", hres);
ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %lx\n", hres);
IUnknown_Release(unk);
SET_EXPECT(CF_QueryInterface_ClassFactory);
SET_EXPECT(CF_CreateInstance);
hres = IRunnableObject_Run(ro, NULL);
todo_wine
ok(hres == S_OK, "Run failed: %x\n", hres);
ok(hres == S_OK, "Run failed: %lx\n", hres);
CHECK_CALLED(CF_QueryInterface_ClassFactory);
CHECK_CALLED(CF_CreateInstance);
IRunnableObject_Release(ro);
......@@ -297,7 +297,7 @@ static void test_default_handler_run(void)
hres = CoCreateInstance(&test_server_clsid, NULL, CLSCTX_LOCAL_SERVER,
&IID_IOleObject, (void**)&oleobj);
todo_wine
ok(hres == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %x\n", hres);
ok(hres == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %lx\n", hres);
todo_wine
CHECK_NOT_CALLED(CF_QueryInterface_ClassFactory);
todo_wine
......
......@@ -89,7 +89,7 @@ static HRESULT check_expect_(enum method func, DWORD expect_param, DWORD *set_pa
if (call_ptr->method == func) break;
} while ((++call_ptr)->method != end_seq);
ok_( file, line )( expect_param == call_ptr->expect_param, "%s: unexpected param %08x expected %08x\n",
ok_( file, line )( expect_param == call_ptr->expect_param, "%s: unexpected param %08lx expected %08lx\n",
method_names[func], expect_param, call_ptr->expect_param );
if (set_param) *set_param = call_ptr->set_param;
hr = call_ptr->set_ret;
......@@ -263,7 +263,7 @@ static int droptarget_refs;
static int test_reentrance;
/* helper macros to make tests a bit leaner */
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static HRESULT WINAPI DropTarget_QueryInterface(IDropTarget* iface, REFIID riid,
void** ppvObject)
......@@ -430,7 +430,7 @@ static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface,
static FORMATETC format = { CF_TEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
HRESULT hr = check_expect(EnumFMT_Next, 0, NULL);
ok(celt == 1, "celt = %d\n", celt);
ok(celt == 1, "celt = %ld\n", celt);
ok(rgelt != NULL, "rgelt == NULL\n");
ok(pceltFetched == NULL, "pceltFetched != NULL\n");
......@@ -624,18 +624,18 @@ static void test_Register_Revoke(void)
hr = RegisterDragDrop(hwnd, &DropTarget);
ok(hr == E_OUTOFMEMORY ||
broken(hr == CO_E_NOTINITIALIZED), /* NT4 */
"RegisterDragDrop without OLE initialized should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr);
"RegisterDragDrop without OLE initialized should have returned E_OUTOFMEMORY instead of 0x%08lx\n", hr);
OleInitialize(NULL);
hr = RegisterDragDrop(hwnd, NULL);
ok(hr == E_INVALIDARG, "RegisterDragDrop with NULL IDropTarget * should return E_INVALIDARG instead of 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "RegisterDragDrop with NULL IDropTarget * should return E_INVALIDARG instead of 0x%08lx\n", hr);
hr = RegisterDragDrop(NULL, &DropTarget);
ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr);
ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08lx\n", hr);
hr = RegisterDragDrop((HWND)0xdeadbeef, &DropTarget);
ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with garbage hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr);
ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with garbage hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08lx\n", hr);
ok(droptarget_refs == 0, "DropTarget refs should be zero not %d\n", droptarget_refs);
hr = RegisterDragDrop(hwnd, &DropTarget);
......@@ -646,7 +646,7 @@ static void test_Register_Revoke(void)
ok(prop == &DropTarget, "expected IDropTarget pointer %p, got %p\n", &DropTarget, prop);
hr = RegisterDragDrop(hwnd, &DropTarget);
ok(hr == DRAGDROP_E_ALREADYREGISTERED, "RegisterDragDrop with already registered hwnd should return DRAGDROP_E_ALREADYREGISTERED instead of 0x%08x\n", hr);
ok(hr == DRAGDROP_E_ALREADYREGISTERED, "RegisterDragDrop with already registered hwnd should return DRAGDROP_E_ALREADYREGISTERED instead of 0x%08lx\n", hr);
ok(droptarget_refs >= 1, "DropTarget refs should be at least one\n");
OleUninitialize();
......@@ -662,7 +662,7 @@ static void test_Register_Revoke(void)
}
hr = RevokeDragDrop(NULL);
ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr);
ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08lx\n", hr);
DestroyWindow(hwnd);
......@@ -674,12 +674,12 @@ static void test_Register_Revoke(void)
NULL, NULL, NULL);
hr = RegisterDragDrop(hwnd, &DropTarget);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
DestroyWindow(hwnd);
hr = RevokeDragDrop(hwnd);
ok(hr == DRAGDROP_E_INVALIDHWND, "got 0x%08x\n", hr);
ok(hr == DRAGDROP_E_INVALIDHWND, "got 0x%08lx\n", hr);
OleUninitialize();
}
......@@ -698,32 +698,32 @@ static void test_DoDragDrop(void)
ok(IsWindow(hwnd), "failed to create window\n");
hr = OleInitialize(NULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = RegisterDragDrop(hwnd, &DropTarget);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
/* incomplete arguments set */
hr = DoDragDrop(NULL, NULL, 0, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(NULL, &DropSource, 0, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(&DataObject, NULL, 0, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(NULL, NULL, 0, &effect);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(&DataObject, &DropSource, 0, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(NULL, &DropSource, 0, &effect);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(&DataObject, NULL, 0, &effect);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
ShowWindow(hwnd, SW_SHOW);
GetWindowRect(hwnd, &rect);
......
......@@ -29,7 +29,7 @@
#include "wine/test.h"
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static const CLSID CLSID_WineTest =
{ /* 9474ba1a-258b-490b-bc13-516e9239ace0 */
......@@ -101,17 +101,17 @@ static void test_error_info(void)
IErrorInfo_Release(pErrorInfo);
hr = GetErrorInfo(0, &pErrorInfo);
ok(hr == S_FALSE, "GetErrorInfo should have returned S_FALSE instead of 0x%08x\n", hr);
ok(hr == S_FALSE, "GetErrorInfo should have returned S_FALSE instead of 0x%08lx\n", hr);
ok(!pErrorInfo, "pErrorInfo should be set to NULL\n");
hr = SetErrorInfo(0, NULL);
ok_ole_success(hr, "SetErrorInfo");
hr = GetErrorInfo(0xdeadbeef, &pErrorInfo);
ok(hr == E_INVALIDARG, "GetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "GetErrorInfo should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = SetErrorInfo(0xdeadbeef, NULL);
ok(hr == E_INVALIDARG, "SetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n", hr);
ok(hr == E_INVALIDARG, "SetErrorInfo should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
}
START_TEST(errorinfo)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment