Microsoft DirectX 8.1 (Visual Basic)

DirectMusicSegment8.ConnectToCollection

The ConnectToCollection method associates a segment with a DLS instrument collection. The collection will be downloaded when the DirectMusicSegment8.Download method is called.

object.ConnectToCollection(c As DirectMusicCollection8)

Parts

object

Resolves to a DirectMusicSegment8 object. 

c

DirectMusicCollection8 object that represents instruments to be used by 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 connected to the segment. This method needs to be called only if the segment is to be played with custom instruments.