DirectX SDK

IDirectMusicPortDownload::AllocateBuffer

The IDirectMusicPortDownload::AllocateBuffer method allocates a chunk of memory for downloading DLS data to the port and returns an IDirectMusicDownload interface pointer that allows access to this buffer.

HRESULT AllocateBuffer(
  DWORD dwSize,
  IDirectMusicDownload** ppIDMDownload
);

Parameters

dwSize
Requested size of buffer.
ppIDMDownload
Address of a variable to receive the IDirectMusicDownload interface pointer.

Return Values

If the method succeeds, it returns S_OK.

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

E_POINTER
E_INVALIDARG
E_OUTOFMEMORY

Remarks

Once a buffer has been allocated, its size cannot change.

The buffer is freed when the IDirectMusicDownload interface is released.

Requirements

  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::GetBuffer, Low-Level DLS