Microsoft DirectX 8.1 (Visual Basic)

DirectMusicLoader8.LoadSegment

The LoadSegment method loads a segment from a MIDI file, a wave file, or a segment file authored in DirectMusic Producer.

object.LoadSegment(filename As String _
) As DirectMusicSegment8

Parts

object

Resolves to a DirectMusicLoader8 object.

filename

Name of the file containing the segment. If the file is not in the current directory or in the directory set by DirectMusicLoader8.SetSearchDirectory, the full path must be given.

Return Values

Returns a DirectMusicSegment8 object.

Error Codes

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

DMUS_E_CHUNKNOTFOUND
DMUS_E_FAIL
DMUS_E_INVALIDARG
DMUS_E_OUTOFMEMORY
DMUS_E_LOADER_FAILEDOPEN
DMUS_E_LOADER_FAILEDCREATE
DMUS_E_LOADER_FORMATNOTSUPPORTED

See Also