Gives information about a driver: it includes the driver name, its version number and its slots count.
Boolean MidiGetDriverInfos (short ref, TDriverInfos * infos);
ref
- a 16-bit integer, it is the reference number of the driver.
infos
- a pointer to a TDriverInfos structure to be filled with the driver characteristics.
typedef struct TDriverInfos { DriverName name; short version; short slots; long reserved[2]; /* reserved for future use */ } TDriverInfos;Fields:
- name: contains the driver name.
- version : contains the driver version number
- slots : contains the number of slots declared by the driver.
The result is a Boolean value which indicates whether MidiShare has been able to get information about the driver or not.
Print information about all the registered MidiShare drivers
void PrintDriverInfos(void) { TDriverInfos infos; short ref, i, n = MidiCountDrivers(); printf( "List of MidiShare drivers :\n" ); for( i = 1; i <= n; i++ ) { ref = MidiGetIndDriver(i); if (MidiGetDriverInfos (ref, &infos)) printf("%i : %s v%d.%d - %d slots\n", ref, infos.name infos.verson/100, infos.version%100, infos.slots ); } }