midiOutOpen (winmm)
Last changed: -81.183.57.230

.
Summary
The midiOutOpen function opens a MIDI output device for playback.

C# Signature:

    [DllImport("winmm.dll")]
    static extern uint midiOutOpen(out IntPtr lphMidiOut, uint uDeviceID, IntPtr dwCallback, IntPtr dwInstance, uint dwFlags);

VB Signature:

    <DllImport("winmm.dll")> Shared Function midiOutOpen(ByRef lphMidiOut As IntPtr, ByVal uDeviceID As UInteger, ByVal dwCallback As IntPtr, ByVal dwInstance As IntPtr, ByVal dwFlags As UInteger) As UInteger
    End Function

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

The device should be disposed with midiOutClose when not needed anymore.

Tips & Tricks:

Please add some!

Sample Code:

IntPtr hmidi;

midiOutOpen(out hmidi, 0, IntPtr.Zero, IntPtr.Zero, 0);

//hmidi is now a valid pointer to MIDI device 0.

Documentation
midiOutOpen on MSDN