Microsoft DirectX 8.0 (C++)

IDirectMusicPortDownload8::AllocateBuffer

Allocates a chunk of memory for downloading DLS data to the port and returns an IDirectMusicDownload8 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 that receives the IDirectMusicDownload8 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

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

The buffer is freed when the IDirectMusicDownload8 interface is released.

Requirements

  Header: Declared in dmusicc.h.

See Also

IDirectMusicPortDownload8::GetBuffer, Low-Level DLS