IDirectMusicPortDownload::Download

The IDirectMusicPortDownload::Download method downloads a wave or instrument definition to the port. The memory must first be allocated by using the IDirectMusicPortDownload::AllocateBuffer method.

HRESULT Download(
  IDirectMusicDownload* pIDMDownload
);
 

Parameters

pIDMDownload
IDirectMusicDownload interface pointer for the buffer.

Return Values

Return values are determined by the implementation of the port.

If the method succeeds, it returns S_OK.

If the method fails, it may return one of the following values:

E_POINTER
E_FAIL
DMUS_E_ALREADY_DOWNLOADED
DMUS_E_BADARTICULATION
DMUS_E_BADINSTRUMENT
DMUS_E_BADOFFSETTABLE
DMUS_E_BADWAVE
DMUS_E_BADWAVELINK
DMUS_E_BUFFERNOTSET
DMUS_E_NOARTICULATION
DMUS_E_NOTMONO
DMUS_E_NOTPCM
DMUS_E_UNKNOWNDOWNLOAD

Remarks

For more information on how to prepare the data to be downloaded, see Low-Level DLS.

Once the memory has been downloaded, you cannot do anything more with it. To update the download, you must create a new buffer and assign it a new download ID obtained by using the IDirectMusicPortDownload::GetDLId method, then send it down.

QuickInfo

  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.

See Also

IDirectMusicPortDownload::Unload, DMUS_DOWNLOADINFO, DMUS_OFFSETTABLE