IDirectMusicPortDownload8::AllocateBuffer

DirectMusic

Microsoft DirectX 9.0 SDK Update (Summer 2004)

IDirectMusicPortDownload8::AllocateBuffer

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

Syntax

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 error values shown in the following table.

Return code
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


© 2004 Microsoft Corporation. All rights reserved.