MidiInPort.MessageReceived 事件

定义

在 MidiInPort 接收数据时发生。

// 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) 

事件类型

注解

应用应订阅此事件来处理输入消息。

如果访问消息的任何部分导致异常,可以假定 MidiInPort 已与设备断开连接。

适用于