dmloader: Remove a now redundant helper function.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2017-07-26 14:28:32 +02:00 committed by Alexandre Julliard
parent f680ccb898
commit cfb1f130fd
2 changed files with 3 additions and 20 deletions

View File

@ -111,25 +111,6 @@ static HRESULT DMUSIC_CopyDescriptor(DMUS_OBJECTDESC *pDst, DMUS_OBJECTDESC *pSr
return S_OK;
}
static BOOL DMUSIC_IsValidLoadableClass (REFCLSID pClassID) {
if (IsEqualCLSID(pClassID, &CLSID_DirectMusicAudioPathConfig) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicBand) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicContainer) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicCollection) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicChordMap) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicSegment) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicScript) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicSong) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicStyle) ||
IsEqualCLSID(pClassID, &CLSID_DirectMusicGraph) ||
IsEqualCLSID(pClassID, &CLSID_DirectSoundWave) ||
IsEqualCLSID(pClassID, &GUID_DirectMusicAllTypes))
return TRUE;
else
return FALSE;
}
/*****************************************************************************
* IDirectMusicLoaderImpl implementation
*/
@ -599,7 +580,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory(IDirectMusicLoader8 *
HRESULT result;
TRACE("(%p, %s, %s, %s)\n", This, debugstr_dmguid(rguidClass), debugstr_w(pwzFileExtension),
debugstr_w(pwzScanFileName));
if (IsEqualGUID (rguidClass, &GUID_DirectMusicAllTypes) || !DMUSIC_IsValidLoadableClass(rguidClass)) {
if (index_from_class(rguidClass) <= 0) {
ERR(": rguidClass invalid CLSID\n");
return REGDB_E_CLASSNOTREG;
}

View File

@ -87,6 +87,8 @@ static void test_directory(void)
IDirectMusicLoader_SetSearchDirectory(loader, NULL, path, 0); /* Crashes on Windows */
hr = IDirectMusicLoader_SetSearchDirectory(loader, &IID_IDirectMusicLoader8, path, 0);
ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr);
hr = IDirectMusicLoader_ScanDirectory(loader, &GUID_DirectMusicAllTypes, con, NULL);
ok(hr == REGDB_E_CLASSNOTREG, "ScanDirectory failed, received %#x\n", hr);
/* NULL extension is not an error */
hr = IDirectMusicLoader_ScanDirectory(loader, &CLSID_DirectSoundWave, NULL, NULL);