This function returns the name of an instance.
#include <mididll.h>
MINSTANCE minstance; /* Instance number. */
PSZ pszInstanceName; /* Instance name. */
ULONG ulFlag; /* Not used. */
ULONG rc; /* Return code. */
rc = MIDIQueryInstanceName(minstance, pszInstanceName,
ulFlag);