midiInGetDevCapsA function (mmeapi.h)

The midiInGetDevCaps function determines the capabilities of a specified MIDI input device.

Syntax

MMRESULT midiInGetDevCapsA(
  UINT_PTR      uDeviceID,
  LPMIDIINCAPSA pmic,
  UINT          cbmic
);

Parameters

uDeviceID

Identifier of the MIDI input device. The device identifier varies from zero to one less than the number of devices present. This parameter can also be a properly cast device handle.

pmic

Pointer to a MIDIINCAPS structure that is filled with information about the capabilities of the device.

cbmic

Size, in bytes, of the MIDIINCAPS structure. Only cbMidiInCaps bytes (or less) of information is copied to the location pointed to by lpMidiInCaps. If cbMidiInCaps is zero, nothing is copied, and the function returns MMSYSERR_NOERROR.

Return value

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.

Return code Description
MMSYSERR_BADDEVICEID
The specified device identifier is out of range.
MMSYSERR_INVALPARAM
The specified pointer or structure is invalid.
MMSYSERR_NODRIVER
The driver is not installed.
MMSYSERR_NOMEM
The system is unable to allocate or lock memory.

Remarks

To determine the number of MIDI input devices present on the system, use the midiInGetNumDevs function.

Note

The mmeapi.h header defines midiInGetDevCaps as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mmeapi.h (include Windows.h)
Library Winmm.lib
DLL Winmm.dll

See also

MIDI Functions