Microsoft DirectX 8.0 (C++) |
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 can return one of the following error values:
E_OUTOFMEMORY |
E_POINTER |
DMUS_E_LOADER_BADPATH |
After 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 refer to other objects to find them by file name without knowing the full path.
When this method has been called, the loader expects the wszFileName member of the DMUS_OBJECTDESC structure to contain only a file name or a path relative to the search directory, unless the DMUS_OBJ_FULLPATH flag is set in the dwValidData member.
Header: Declared in dmusici.h.
IDirectMusicLoader8::ScanDirectory, Setting the Loader's Search Directory