static extern uint midiOutGetNumDevs();
uint outDevs = midiOutGetNumDevs();
Declare Function midiOutGetNumDevs Lib "winmm.dll" () As uint