ole32/tests: Remove superfluous pointer casts.
This commit is contained in:
parent
170f7f8dc1
commit
bdbfac5996
|
@ -68,7 +68,7 @@ static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFII
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumFORMATETC)) {
|
||||
IEnumFORMATETC_AddRef(iface);
|
||||
*ppvObj = (LPVOID)This;
|
||||
*ppvObj = This;
|
||||
return S_OK;
|
||||
}
|
||||
*ppvObj = NULL;
|
||||
|
@ -165,7 +165,7 @@ static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID r
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) {
|
||||
IDataObject_AddRef(iface);
|
||||
*ppvObj = (LPVOID)This;
|
||||
*ppvObj = This;
|
||||
return S_OK;
|
||||
}
|
||||
*ppvObj = NULL;
|
||||
|
|
|
@ -89,7 +89,7 @@ static HRESULT WINAPI Test_IClassFactory_QueryInterface(
|
|||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ static HRESULT WINAPI MessageFilter_QueryInterface(IMessageFilter *iface, REFIID
|
|||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IMessageFilter_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ static HRESULT WINAPI Test_IUnknown_QueryInterface(
|
|||
if (IsEqualIID(riid, &IID_IUnknown) ||
|
||||
IsEqualIID(riid, &IID_IWineTest))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ static void test_CoRegisterPSClsid(void)
|
|||
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
|
||||
ok_ole_success(hr, "CreateStreamOnHGlobal");
|
||||
|
||||
hr = CoMarshalInterface(stream, &IID_IWineTest, (IUnknown *)&Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
hr = CoMarshalInterface(stream, &IID_IWineTest, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok(hr == E_NOTIMPL, "CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08x\n", hr);
|
||||
IStream_Release(stream);
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ static HRESULT WINAPI Test_IUnknown_QueryInterface(
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ static HRESULT WINAPI Test_IClassFactory_QueryInterface(
|
|||
/* the only other interface Wine is currently able to marshal (for testing two proxies) */
|
||||
IsEqualGUID(riid, &IID_IRemUnknown))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ struct host_object_data
|
|||
|
||||
static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||
{
|
||||
struct host_object_data *data = (struct host_object_data *)p;
|
||||
struct host_object_data *data = p;
|
||||
HRESULT hr;
|
||||
MSG msg;
|
||||
|
||||
|
@ -833,7 +833,7 @@ struct ncu_params
|
|||
/* helper for test_no_couninitialize_server */
|
||||
static DWORD CALLBACK no_couninitialize_server_proc(LPVOID p)
|
||||
{
|
||||
struct ncu_params *ncu_params = (struct ncu_params *)p;
|
||||
struct ncu_params *ncu_params = p;
|
||||
HRESULT hr;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
@ -899,7 +899,7 @@ static void test_no_couninitialize_server(void)
|
|||
/* STA -> STA call during DLL_THREAD_DETACH */
|
||||
static DWORD CALLBACK no_couninitialize_client_proc(LPVOID p)
|
||||
{
|
||||
struct ncu_params *ncu_params = (struct ncu_params *)p;
|
||||
struct ncu_params *ncu_params = p;
|
||||
HRESULT hr;
|
||||
IUnknown *pProxy = NULL;
|
||||
|
||||
|
@ -1370,7 +1370,7 @@ static void test_hresult_marshaling(void)
|
|||
/* helper for test_proxy_used_in_wrong_thread */
|
||||
static DWORD CALLBACK bad_thread_proc(LPVOID p)
|
||||
{
|
||||
IClassFactory * cf = (IClassFactory *)p;
|
||||
IClassFactory * cf = p;
|
||||
HRESULT hr;
|
||||
IUnknown * proxy = NULL;
|
||||
|
||||
|
@ -1447,7 +1447,7 @@ static void test_proxy_used_in_wrong_thread(void)
|
|||
IClassFactory_QueryInterface(pProxy, &IID_IStream, (LPVOID *)&pStream);
|
||||
|
||||
/* create a thread that we can misbehave in */
|
||||
thread = CreateThread(NULL, 0, bad_thread_proc, (LPVOID)pProxy, 0, &tid2);
|
||||
thread = CreateThread(NULL, 0, bad_thread_proc, pProxy, 0, &tid2);
|
||||
|
||||
WaitForSingleObject(thread, INFINITE);
|
||||
CloseHandle(thread);
|
||||
|
@ -1468,7 +1468,7 @@ static HRESULT WINAPI MessageFilter_QueryInterface(IMessageFilter *iface, REFIID
|
|||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1679,7 +1679,7 @@ static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, v
|
|||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
*ppv = (LPVOID)iface;
|
||||
*ppv = iface;
|
||||
return S_OK;
|
||||
}
|
||||
*ppv = NULL;
|
||||
|
@ -2105,7 +2105,7 @@ static void test_freethreadedmarshaler(void)
|
|||
/* inproc normal marshaling */
|
||||
|
||||
hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory,
|
||||
(IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok_ole_success(hr, IMarshal_MarshalInterface);
|
||||
|
||||
ok_more_than_one_lock();
|
||||
|
@ -2127,7 +2127,7 @@ static void test_freethreadedmarshaler(void)
|
|||
/* local normal marshaling */
|
||||
|
||||
IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL);
|
||||
hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
|
||||
hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, &Test_ClassFactory, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
|
||||
ok_ole_success(hr, IMarshal_MarshalInterface);
|
||||
|
||||
ok_more_than_one_lock();
|
||||
|
@ -2193,7 +2193,7 @@ static void test_freethreadedmarshaler(void)
|
|||
|
||||
IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL);
|
||||
hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory,
|
||||
(IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok_ole_success(hr, IMarshal_MarshalInterface);
|
||||
|
||||
ok_more_than_one_lock();
|
||||
|
@ -2277,7 +2277,7 @@ static HRESULT WINAPI Test_SMI_QueryInterface(
|
|||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IStdMarshalInfo))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -2437,7 +2437,7 @@ static void test_client_security(void)
|
|||
|
||||
CoTaskMemFree(pServerPrincName);
|
||||
|
||||
hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pUnknown1, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities);
|
||||
hr = IClientSecurity_QueryBlanket(pCliSec, pUnknown1, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities);
|
||||
todo_wine ok_ole_success(hr, "IClientSecurity_QueryBlanket(IUnknown)");
|
||||
|
||||
CoTaskMemFree(pServerPrincName);
|
||||
|
@ -2479,7 +2479,7 @@ static HRESULT WINAPI TestOOP_IClassFactory_QueryInterface(
|
|||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -2694,7 +2694,7 @@ struct git_params
|
|||
static DWORD CALLBACK get_global_interface_proc(LPVOID pv)
|
||||
{
|
||||
HRESULT hr;
|
||||
struct git_params *params = (struct git_params *)pv;
|
||||
struct git_params *params = pv;
|
||||
IClassFactory *cf;
|
||||
|
||||
hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf);
|
||||
|
|
|
@ -92,7 +92,7 @@ static HRESULT WINAPI Test_IClassFactory_QueryInterface(
|
|||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, v
|
|||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
*ppv = (LPVOID)iface;
|
||||
*ppv = iface;
|
||||
return S_OK;
|
||||
}
|
||||
*ppv = NULL;
|
||||
|
|
|
@ -68,7 +68,7 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v
|
|||
*ppv = NULL;
|
||||
|
||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IOleObject))
|
||||
*ppv = (void *)iface;
|
||||
*ppv = iface;
|
||||
else if (IsEqualIID(riid, &IID_IPersistStorage))
|
||||
*ppv = &OleObjectPersistStg;
|
||||
else if (IsEqualIID(riid, &IID_IOleCache))
|
||||
|
@ -1497,7 +1497,7 @@ static void test_runnable(void)
|
|||
NULL
|
||||
};
|
||||
|
||||
IOleObject *object = (IOleObject *)&OleObject;
|
||||
IOleObject *object = &OleObject;
|
||||
|
||||
expected_method_list = methods_query_runnable;
|
||||
ok(OleIsRunning(object), "Object should be running\n");
|
||||
|
|
|
@ -100,7 +100,7 @@ static void testProps(void)
|
|||
|
||||
/* test setting one by name with an invalid propidNameFirst */
|
||||
spec.ulKind = PRSPEC_LPWSTR;
|
||||
U(spec).lpwstr = (LPOLESTR)propName;
|
||||
U(spec).lpwstr = propName;
|
||||
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var,
|
||||
PID_DICTIONARY);
|
||||
ok(hr == STG_E_INVALIDPARAMETER,
|
||||
|
@ -123,7 +123,7 @@ static void testProps(void)
|
|||
|
||||
/* set one by name */
|
||||
spec.ulKind = PRSPEC_LPWSTR;
|
||||
U(spec).lpwstr = (LPOLESTR)propName;
|
||||
U(spec).lpwstr = propName;
|
||||
U(var).lVal = 2;
|
||||
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var,
|
||||
PID_FIRST_USABLE);
|
||||
|
@ -164,7 +164,7 @@ static void testProps(void)
|
|||
var.vt, U(var).lVal);
|
||||
/* read by name */
|
||||
spec.ulKind = PRSPEC_LPWSTR;
|
||||
U(spec).lpwstr = (LPOLESTR)propName;
|
||||
U(spec).lpwstr = propName;
|
||||
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
|
||||
ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
|
||||
ok(var.vt == VT_I4 && U(var).lVal == 2,
|
||||
|
@ -237,7 +237,7 @@ static void testProps(void)
|
|||
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;
|
||||
U(var).pszVal = val;
|
||||
hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
|
||||
ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
|
||||
/* revert it */
|
||||
|
@ -269,7 +269,7 @@ static void testProps(void)
|
|||
|
||||
/* check properties again */
|
||||
spec.ulKind = PRSPEC_LPWSTR;
|
||||
U(spec).lpwstr = (LPOLESTR)propName;
|
||||
U(spec).lpwstr = propName;
|
||||
hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
|
||||
ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
|
||||
ok(var.vt == VT_I4 && U(var).lVal == 2,
|
||||
|
|
|
@ -386,7 +386,7 @@ static HRESULT WINAPI Test_IUnknown_QueryInterface(
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
*ppvObj = (LPVOID)iface;
|
||||
*ppvObj = iface;
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue