The midiOutGetNumDevs function retrieves the number of MIDI output devices present in the system.
UINT midiOutGetNumDevs();
int midiOutGetNumDevs() => _midiOutGetNumDevs();