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 已與裝置中斷連線。