Share via


MidiInPort.MessageReceived Event

Definition

Occurs when the MidiInPort receives data.

// Register
event_token MessageReceived(TypedEventHandler<MidiInPort, MidiMessageReceivedEventArgs const&> const& handler) const;

// Revoke with event_token
void MessageReceived(event_token const* cookie) const;

// Revoke with event_revoker
MidiInPort::MessageReceived_revoker MessageReceived(auto_revoke_t, TypedEventHandler<MidiInPort, MidiMessageReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<MidiInPort,MidiMessageReceivedEventArgs> MessageReceived;
function onMessageReceived(eventArgs) { /* Your code */ }
midiInPort.addEventListener("messagereceived", onMessageReceived);
midiInPort.removeEventListener("messagereceived", onMessageReceived);
- or -
midiInPort.onmessagereceived = onMessageReceived;
Public Custom Event MessageReceived As TypedEventHandler(Of MidiInPort, MidiMessageReceivedEventArgs) 

Event Type

Remarks

Apps should subscribe to this event to handle the input messages.

If accessing any part of the message results in an exception, it can be assumed that the MidiInPort has been disconnected from the device.

Applies to