dmusic: Remove superfluous pointer casts.

This commit is contained in:
Michael Stefaniuc 2009-01-13 10:57:20 +01:00 committed by Alexandre Julliard
parent 934ed50d49
commit 68eb63a4fa
4 changed files with 10 additions and 10 deletions

View File

@ -36,19 +36,19 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IUnknown_QueryInterface (LPUNKN
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
if (IsEqualIID (riid, &IID_IUnknown)) {
*ppobj = (LPVOID)&This->UnknownVtbl;
*ppobj = &This->UnknownVtbl;
IDirectMusicCollectionImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicCollection)) {
*ppobj = (LPVOID)&This->CollectionVtbl;
*ppobj = &This->CollectionVtbl;
IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef ((LPDIRECTMUSICCOLLECTION)&This->CollectionVtbl);
return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
*ppobj = (LPVOID)&This->ObjectVtbl;
*ppobj = &This->ObjectVtbl;
IDirectMusicCollectionImpl_IDirectMusicObject_AddRef ((LPDIRECTMUSICOBJECT)&This->ObjectVtbl);
return S_OK;
} else if (IsEqualIID (riid, &IID_IPersistStream)) {
*ppobj = (LPVOID)&This->PersistStreamVtbl;
*ppobj = &This->PersistStreamVtbl;
IDirectMusicCollectionImpl_IPersistStream_AddRef ((LPPERSISTSTREAM)&This->PersistStreamVtbl);
return S_OK;
}

View File

@ -91,7 +91,7 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwI
TRACE("enumerating 'digital sound' ports\n");
if (i == dwIndex)
{
DirectSoundEnumerateA((LPDSENUMCALLBACKA) register_waveport, (VOID*) pPortCaps);
DirectSoundEnumerateA(register_waveport, pPortCaps);
return S_OK;
}
}

View File

@ -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);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &DirectMusic_CF;
*ppv = &DirectMusic_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicCollection) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Collection_CF;
*ppv = &Collection_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}

View File

@ -33,11 +33,11 @@ static HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKN
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
if (IsEqualIID (riid, &IID_IUnknown)) {
*ppobj = (LPVOID)&This->UnknownVtbl;
*ppobj = &This->UnknownVtbl;
IDirectMusicInstrumentImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicInstrument)) {
*ppobj = (LPVOID)&This->InstrumentVtbl;
*ppobj = &This->InstrumentVtbl;
IDirectMusicInstrumentImpl_IDirectMusicInstrument_AddRef ((LPDIRECTMUSICINSTRUMENT)&This->InstrumentVtbl);
return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicInstrumentPRIVATE)) {
@ -46,7 +46,7 @@ static HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKN
that whoever calls it knows the layout of original implementation table and therefore
tries to get data by direct access... expect crashes */
FIXME("*sigh*... requested private/unspecified interface\n");
*ppobj = (LPVOID)&This->UnknownVtbl;
*ppobj = &This->UnknownVtbl;
IDirectMusicInstrumentImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
return S_OK;
}