Gives the name of an application. Knowing an application reference number, it is possible to find its name using the MidiGetName function. It is also possible to find the reference number of an application via its name using the MidiGetNamedAppl function.
pascal MidiNamepMidiGetName(short refNum);
refNum
- a 16-bit integer, the reference number of the application.
The result is pointer on a character string representing the application name.
Print the name of all the active 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. Consequently, in C, the result of MidiGetName is a Pascal string that must be converted to a C string before being printed.