Commit 88111ca2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/tests: Remove some casts we don't need, fix a couple of others.

parent b19ad3af
...@@ -484,7 +484,7 @@ static IOleObject OleObject = { &OleObjectVtbl }; ...@@ -484,7 +484,7 @@ static IOleObject OleObject = { &OleObjectVtbl };
static HRESULT WINAPI OleObjectPersistStg_QueryInterface(IPersistStorage *iface, REFIID riid, void **ppv) static HRESULT WINAPI OleObjectPersistStg_QueryInterface(IPersistStorage *iface, REFIID riid, void **ppv)
{ {
trace("OleObjectPersistStg_QueryInterface\n"); trace("OleObjectPersistStg_QueryInterface\n");
return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); return IOleObject_QueryInterface(&OleObject, riid, ppv);
} }
static ULONG WINAPI OleObjectPersistStg_AddRef(IPersistStorage *iface) static ULONG WINAPI OleObjectPersistStg_AddRef(IPersistStorage *iface)
...@@ -582,7 +582,7 @@ static IPersistStorage OleObjectPersistStg = { &OleObjectPersistStgVtbl }; ...@@ -582,7 +582,7 @@ static IPersistStorage OleObjectPersistStg = { &OleObjectPersistStgVtbl };
static HRESULT WINAPI OleObjectCache_QueryInterface(IOleCache *iface, REFIID riid, void **ppv) static HRESULT WINAPI OleObjectCache_QueryInterface(IOleCache *iface, REFIID riid, void **ppv)
{ {
return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); return IOleObject_QueryInterface(&OleObject, riid, ppv);
} }
static ULONG WINAPI OleObjectCache_AddRef(IOleCache *iface) static ULONG WINAPI OleObjectCache_AddRef(IOleCache *iface)
...@@ -708,7 +708,7 @@ static ULONG WINAPI OleObjectCF_Release(IClassFactory *iface) ...@@ -708,7 +708,7 @@ static ULONG WINAPI OleObjectCF_Release(IClassFactory *iface)
static HRESULT WINAPI OleObjectCF_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID riid, void **ppv) static HRESULT WINAPI OleObjectCF_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID riid, void **ppv)
{ {
return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); return IOleObject_QueryInterface(&OleObject, riid, ppv);
} }
static HRESULT WINAPI OleObjectCF_LockServer(IClassFactory *iface, BOOL lock) static HRESULT WINAPI OleObjectCF_LockServer(IClassFactory *iface, BOOL lock)
...@@ -729,7 +729,7 @@ static IClassFactory OleObjectCF = { &OleObjectCFVtbl }; ...@@ -729,7 +729,7 @@ static IClassFactory OleObjectCF = { &OleObjectCFVtbl };
static HRESULT WINAPI OleObjectRunnable_QueryInterface(IRunnableObject *iface, REFIID riid, void **ppv) static HRESULT WINAPI OleObjectRunnable_QueryInterface(IRunnableObject *iface, REFIID riid, void **ppv)
{ {
return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); return IOleObject_QueryInterface(&OleObject, riid, ppv);
} }
static ULONG WINAPI OleObjectRunnable_AddRef(IRunnableObject *iface) static ULONG WINAPI OleObjectRunnable_AddRef(IRunnableObject *iface)
...@@ -1912,13 +1912,13 @@ static void test_data_cache_dib_contents_stream(int num) ...@@ -1912,13 +1912,13 @@ static void test_data_cache_dib_contents_stream(int num)
CLSID cls; CLSID cls;
SIZEL sz; SIZEL sz;
hr = CreateDataCache( NULL, &CLSID_Picture_Metafile, &IID_IUnknown, (void *)&unk ); hr = CreateDataCache( NULL, &CLSID_Picture_Metafile, &IID_IUnknown, (void **)&unk );
ok( SUCCEEDED(hr), "got %08x\n", hr ); ok( SUCCEEDED(hr), "got %08x\n", hr );
hr = IUnknown_QueryInterface( unk, &IID_IPersistStorage, (void *)&persist ); hr = IUnknown_QueryInterface( unk, &IID_IPersistStorage, (void **)&persist );
ok( SUCCEEDED(hr), "got %08x\n", hr ); ok( SUCCEEDED(hr), "got %08x\n", hr );
hr = IUnknown_QueryInterface( unk, &IID_IDataObject, (void *)&data ); hr = IUnknown_QueryInterface( unk, &IID_IDataObject, (void **)&data );
ok( SUCCEEDED(hr), "got %08x\n", hr ); ok( SUCCEEDED(hr), "got %08x\n", hr );
hr = IUnknown_QueryInterface( unk, &IID_IViewObject2, (void *)&view ); hr = IUnknown_QueryInterface( unk, &IID_IViewObject2, (void **)&view );
ok( SUCCEEDED(hr), "got %08x\n", hr ); ok( SUCCEEDED(hr), "got %08x\n", hr );
stg = create_storage( num ); stg = create_storage( num );
...@@ -2333,7 +2333,7 @@ static void test_OleLockRunning(void) ...@@ -2333,7 +2333,7 @@ static void test_OleLockRunning(void)
{ {
HRESULT hr; HRESULT hr;
hr = OleLockRunning((LPUNKNOWN)&unknown, TRUE, FALSE); hr = OleLockRunning(&unknown, TRUE, FALSE);
ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr); ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr);
} }
......
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