The IDirectMusicPerformance::DownloadInstrument method downloads DLS data for an instrument to a port.
HRESULT DownloadInstrument(
IDirectMusicInstrument* pInst,
DWORD dwPChannel,
IDirectMusicDownloadedInstrument** ppDownInst,
DMUS_NOTERANGE* pNoteRanges,
DWORD dwNumNoteRanges,
IDirectMusicPort** ppPort,
DWORD* pdwGroup,
DWORD* pdwMChannel
);
If the method succeeds, the return value is S_OK.
If it fails, the method may return one of the following error values:
E_INVALIDARG |
E_POINTER |
Most applications will not need to use this method, as instrument downloading is normally handled by bands. See Downloading Bands.
The method will return E_INVALIDARG if the PChannel isn't assigned to a port.
To prevent loss of resources, the instrument should be unloaded by using the IDirectMusicPort::UnloadInstrument method when it is no longer needed.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusici.h.
IDirectMusicPort::DownloadInstrument, IDirectMusicPort::UnloadInstrument, Working with Instruments