Microsoft DirectX 8.0 (C++)

IDirectMusicPort8::SetReadNotificationHandle

Specifies an event that is to be set when MIDI messages are available to be read with the IDirectMusicPort8::Read method. The event is signaled whenever new data is available. To turn off event notification, call SetReadNotificationHandle with a NULL value for the hEvent parameter.

HRESULT SetReadNotificationHandle(
  HANDLE hEvent
);

Parameters

hEvent
Event handle obtained from a call to the Win32 CreateEvent function. It is the application's responsibility to close this handle after the port has been released.

Return Values

If it succeeds, the method returns S_OK.

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

DMUS_E_DMUSIC_RELEASED
E_NOTIMPL

Remarks

A return value of E_NOTIMPL can mean the port is not an input port.

Requirements

  Header: Declared in dmusicc.h.

See Also

Capturing MIDI