dmband: Simplify DllGetClassObject.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2019-10-28 22:35:15 +01:00 committed by Alexandre Julliard
parent fea66c2884
commit 422c4fbf71
1 changed files with 5 additions and 10 deletions

View File

@ -145,15 +145,10 @@ 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_DirectMusicBand) && IsEqualIID (riid, &IID_IClassFactory)) { if (IsEqualCLSID(rclsid, &CLSID_DirectMusicBand))
*ppv = &Band_CF; return IClassFactory_QueryInterface(&Band_CF.IClassFactory_iface, riid, ppv);
IClassFactory_AddRef((IClassFactory*)*ppv); else if (IsEqualCLSID(rclsid, &CLSID_DirectMusicBandTrack))
return S_OK; return IClassFactory_QueryInterface(&BandTrack_CF.IClassFactory_iface, riid, ppv);
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicBandTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = &BandTrack_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;