Gives the number of Midi applications currently active.
pascal short MidiCountAppls();
The result is a 16-bit integer, the number of currently opened Midi applications.
Print the name of all the actives MidiShare applications.
void PrintApplNames(void) { short ref; short i; printf( "List of MidiShare applications :\n" ); for( i = 1; i <= MidiCountAppls(); ++i ) { ref = MidiGetIndAppl(i); printf("%i : %s \n", ref, MidiGetName( ref ) ); } }
MidiShare was originally developed for Pascal on the Macintosh. Therefore, in C, the result of MidiGetName is a Pascal string that must be converted to a C string before being printed.