The IDirectMusicInstrument interface represents an individual instrument from a DLS collection.
The only way to create a DirectMusicInstrument object for downloading an instrument is to first create a DirectMusicCollection object, then call the IDirectMusicCollection::GetInstrument method. GetInstrument creates a DirectMusicInstrument object and returns its IDirectMusicInstrument interface pointer.
To download the instrument, pass its interface pointer to the IDirectMusicPort::DownloadInstrument or IDirectMusicPerformance::DownloadInstrument method. If the method succeeds, it returns a pointer to an IDirectMusicDownloadedInstrument interface, which is used only to unload the instrument.
It is important to note that the methods of IDirectMusicInstrument only operate on an instrument that has not been downloaded. Any instances of the instrument that have been downloaded to a port are not affected by the IDirectMusicInstrument::GetPatch and IDirectMusicInstrument::SetPatch methods.
The interface has the following methods:
IDirectMusicInstrument | GetPatch |
SetPatch |
All COM interfaces inherit the IUnknown interface methods. This interface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusicc.h.