The IDirectMusicLoader::SetSearchDirectory method sets a search path for finding object files. The search path can be set for one object file type or for all files.
HRESULT SetSearchDirectory(
REFGUID rguidClass,
WCHAR* pwszPath,
BOOL fClear
);
If the method succeeds, the return value is S_OK, or S_FALSE if the search directory is already set to pwszPath.
If it fails, the method may return one of the following error values:
E_OUTOFMEMORY |
E_POINTER |
DMUS_E_LOADER_BADPATH |
Once a search path is set, the loader does not need a full path every time it is given an object to load by file name. This enables objects that reference other objects to find them by file name without knowing the full path.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusici.h.
IDirectMusicLoader::ScanDirectory, Setting the Loader's Search Directory