MidiInPort.MessageReceived 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在 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 已与设备断开连接。