DirectX SDK

DirectMusicSegment.ConnectToCollection

The DirectMusicSegment.ConnectToCollection method associates a segment with a DLS instrument collection. This is the collection that is downloaded when the DirectMusicSegment.Download method is called.

object.ConnectToCollection(c As DirectMusicCollection)

Parameters

object
Object expression that resolves to a DirectMusicSegment object.
c
DirectMusicCollection object representing instruments to be used in playing the segment.

Error Codes

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

DMUS_E_SET_UNSUPPORTED
DMUS_E_TRACK_NOT_FOUND

Remarks

By default, the General MIDI collection in the Gm.dls file is used. This method needs to be called only if the segment is to be played with custom instruments.