DirectX SDK

IDirectMusic::CreateMusicBuffer

The IDirectMusic::CreateMusicBuffer method creates a DirectMusicBuffer object to hold music messages being sequenced to the port. Most applications do not need to call this method directly because buffer management is handled by the performance when a port is added.

HRESULT CreateMusicBuffer(
  LPDMUS_BUFFERDESC pBufferDesc, 
  LPDIRECTMUSICBUFFER *ppBuffer, 
  LPUNKNOWN pUnkOuter 
);

Parameters

pBufferDesc
Address of the DMUS_BUFFERDESC structure that contains the description of the music buffer to be created. The application must initialize the dwSize member of this structure before passing the pointer. See Remarks.
ppBuffer
Address of a variable to receive the IDirectMusicBuffer interface pointer.
pUnkOuter
Address of the controlling object's IUnknown interface for COM aggregation. Aggregration is not currently supported, so this value must be set to NULL.

Return Values

If the method succeeds, the return value is S_OK.

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

E_INVALIDARG
E_NOAGGREGATION
E_NOINTERFACE
E_OUTOFMEMORY
E_POINTER

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.