Share via


MidiInPort Class

Definition

Represents a port used to receive MIDI messages from a MIDI device.

public ref class MidiInPort sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MidiInPort final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MidiInPort : System.IDisposable
Public NotInheritable Class MidiInPort
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MidiInPort
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

If the MidiInPort becomes disconnected for any reason, it should be disposed and a new one created to continue receiving messages.

Properties

DeviceId

Gets the id of the device that was used to initialize the MidiInPort.

Methods

Close()

Closes the MidiInPort.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FromIdAsync(String)

Creates a MidiInPort object for the specified device.

GetDeviceSelector()

Gets a query string that can be used to enumerate all MidiInPort objects on the system.

Events

MessageReceived

Occurs when the MidiInPort receives data.

Applies to

See also