MidiGetIndAppl


Gives the reference of number of an application from is order number. The MidiGetIndAppl function allows to know the reference number of any application by giving its order number (a number between 1 and MidiCountAppls() ).

pascal short    MidiGetIndAppl (short index);

index
a 16-bit integer, is the index number of an application between 1 and MidiCountAppls().

The result is an application reference number or MIDIerrIndex if the index is out of range.


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. Consequently, in C, the result of MidiGetName is a Pascal string that must be converted to a C string before being printed.