WORD midiInGetID(hMidiIn, lpwDeviceID)
This function gets the device ID for a MIDI input device.
HMIDIIN hMidiIn
Specifies the handle to the MIDI input device.
LPWORD lpwDeviceID
Specifies a pointer to the WORD-sized memory location to be filled with the device ID.
Returns zero if successful. Otherwise, returns an error number. Possible error returns are:
MMSYSERR_INVALHANDLE
The hMidiIn parameter specifies an invalid handle.