DirectX SDK

IDirectMusicBuffer::GetNextEvent

The IDirectMusicBuffer::GetNextEvent method returns information about the next message in the buffer and advances the read pointer.

HRESULT GetNextEvent(
  LPREFERENCE_TIME prt, 
  LPDWORD pdwChannelGroup, 
  LPDWORD pdwLength, 
  LPBYTE* ppData
);

Parameters

prt
Address of a variable to receive the time of the message.
pdwChannelGroup
Address of a variable to receive the channel group of the message.
pdwLength
Address of a variable to receive the length, in bytes, of the message.
ppData
Address of a variable to receive a pointer to the message data.

Return Values

If the method succeeds, the return value is S_OK, or S_FALSE if there are no messages in the buffer.

If it fails, the method can return E_POINTER.

Remarks

Any of the passed pointers can be NULL if the item is not needed.

The pointer returned in ppData is valid only for the lifetime of the buffer object.

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

IDirectMusicBuffer::ResetReadPtr