Platform SDK: DirectX

DirectMusicLoader.SetSearchDirectory

The DirectMusicLoader.SetSearchDirectory method sets the directory to be searched by the DirectMusicLoader.LoadBand, DirectMusicLoader.LoadChordmap, DirectMusicLoader.LoadCollection, DirectMusicLoader.LoadSegment, and DirectMusicLoader.LoadStyle methods when a fully qualified path is not supplied.

object.SetSearchDirectory(dir As String)

Parameters

object
Object expression that resolves to a DirectMusicLoader object.
dir
Directory to search.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DMUS_E_OUTOFMEMORY
DMUS_E_LOADER_BADPATH

Remarks

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 allows objects that refer to other objects to find them by file name without knowing the full path.