Commit 68eb63a4 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmusic: Remove superfluous pointer casts.

parent 934ed50d
...@@ -36,19 +36,19 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IUnknown_QueryInterface (LPUNKN ...@@ -36,19 +36,19 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IUnknown_QueryInterface (LPUNKN
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj); TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
if (IsEqualIID (riid, &IID_IUnknown)) { if (IsEqualIID (riid, &IID_IUnknown)) {
*ppobj = (LPVOID)&This->UnknownVtbl; *ppobj = &This->UnknownVtbl;
IDirectMusicCollectionImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); IDirectMusicCollectionImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
return S_OK; return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicCollection)) { } else if (IsEqualIID (riid, &IID_IDirectMusicCollection)) {
*ppobj = (LPVOID)&This->CollectionVtbl; *ppobj = &This->CollectionVtbl;
IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef ((LPDIRECTMUSICCOLLECTION)&This->CollectionVtbl); IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef ((LPDIRECTMUSICCOLLECTION)&This->CollectionVtbl);
return S_OK; return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) { } else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
*ppobj = (LPVOID)&This->ObjectVtbl; *ppobj = &This->ObjectVtbl;
IDirectMusicCollectionImpl_IDirectMusicObject_AddRef ((LPDIRECTMUSICOBJECT)&This->ObjectVtbl); IDirectMusicCollectionImpl_IDirectMusicObject_AddRef ((LPDIRECTMUSICOBJECT)&This->ObjectVtbl);
return S_OK; return S_OK;
} else if (IsEqualIID (riid, &IID_IPersistStream)) { } else if (IsEqualIID (riid, &IID_IPersistStream)) {
*ppobj = (LPVOID)&This->PersistStreamVtbl; *ppobj = &This->PersistStreamVtbl;
IDirectMusicCollectionImpl_IPersistStream_AddRef ((LPPERSISTSTREAM)&This->PersistStreamVtbl); IDirectMusicCollectionImpl_IPersistStream_AddRef ((LPPERSISTSTREAM)&This->PersistStreamVtbl);
return S_OK; return S_OK;
} }
......
...@@ -91,7 +91,7 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwI ...@@ -91,7 +91,7 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwI
TRACE("enumerating 'digital sound' ports\n"); TRACE("enumerating 'digital sound' ports\n");
if (i == dwIndex) if (i == dwIndex)
{ {
DirectSoundEnumerateA((LPDSENUMCALLBACKA) register_waveport, (VOID*) pPortCaps); DirectSoundEnumerateA(register_waveport, pPortCaps);
return S_OK; return S_OK;
} }
} }
......
...@@ -167,11 +167,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -167,11 +167,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{ {
TRACE("(%s, %s, %p)\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); TRACE("(%s, %s, %p)\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) { if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &DirectMusic_CF; *ppv = &DirectMusic_CF;
IClassFactory_AddRef((IClassFactory*)*ppv); IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK; return S_OK;
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicCollection) && IsEqualIID (riid, &IID_IClassFactory)) { } else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicCollection) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Collection_CF; *ppv = &Collection_CF;
IClassFactory_AddRef((IClassFactory*)*ppv); IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK; return S_OK;
} }
......
...@@ -33,11 +33,11 @@ static HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKN ...@@ -33,11 +33,11 @@ static HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKN
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj); TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
if (IsEqualIID (riid, &IID_IUnknown)) { if (IsEqualIID (riid, &IID_IUnknown)) {
*ppobj = (LPVOID)&This->UnknownVtbl; *ppobj = &This->UnknownVtbl;
IDirectMusicInstrumentImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); IDirectMusicInstrumentImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
return S_OK; return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicInstrument)) { } else if (IsEqualIID (riid, &IID_IDirectMusicInstrument)) {
*ppobj = (LPVOID)&This->InstrumentVtbl; *ppobj = &This->InstrumentVtbl;
IDirectMusicInstrumentImpl_IDirectMusicInstrument_AddRef ((LPDIRECTMUSICINSTRUMENT)&This->InstrumentVtbl); IDirectMusicInstrumentImpl_IDirectMusicInstrument_AddRef ((LPDIRECTMUSICINSTRUMENT)&This->InstrumentVtbl);
return S_OK; return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicInstrumentPRIVATE)) { } else if (IsEqualIID (riid, &IID_IDirectMusicInstrumentPRIVATE)) {
...@@ -46,7 +46,7 @@ static HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKN ...@@ -46,7 +46,7 @@ static HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKN
that whoever calls it knows the layout of original implementation table and therefore that whoever calls it knows the layout of original implementation table and therefore
tries to get data by direct access... expect crashes */ tries to get data by direct access... expect crashes */
FIXME("*sigh*... requested private/unspecified interface\n"); FIXME("*sigh*... requested private/unspecified interface\n");
*ppobj = (LPVOID)&This->UnknownVtbl; *ppobj = &This->UnknownVtbl;
IDirectMusicInstrumentImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); IDirectMusicInstrumentImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
return S_OK; return S_OK;
} }
......
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