MCI_INFO

The MCI_INFO command retrieves string information from a device. All devices recognize this command. Information is returned in the lpstrReturn member of the structure identified by lpInfo. The dwRetSize member specifies the buffer length for the returned data.

MCIERROR mciSendCommand(MCIDEVICEID wDeviceID, MCI_INFO, 
    DWORD dwFlags, (DWORD) (LPMCI_INFO_PARMS) lpInfo);
 

Parameters

wDeviceID
Device identifier of the MCI device that is to receive the command message.
dwFlags
MCI_NOTIFY, MCI_WAIT, or, for digital-video and VCR devices, MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.
lpInfo
Address of an MCI_INFO_PARMS structure. (Devices with extended command sets might replace this structure with a device-specific structure.)

Return Values

Returns zero if successful or an error otherwise.

Remarks

The following additional standard and command-specific flag applies to all devices supporting MCI_INFO:

MCI_INFO_PRODUCT
Obtains a description of the hardware associated with a device. Devices should supply a description that identifies both the driver and the hardware used.

The following additional flags apply to the cdaudio device type:

MCI_INFO_MEDIA_IDENTITY
Produces a unique identifier for the audio CD currently loaded in the player being queried. This flag returns a string of 16 hexadecimal digits.
MCI_INFO_MEDIA_UPC
Produces the Universal Product Code (UPC) that is encoded on an audio CD. The UPC is a string of digits. It might not be available for all CDs.

The following additional flags apply to the digitalvideo device type:

MCI_DGV_INFO_ITEM
A constant indicating the information desired is included in the dwItem member of the structure identified by lpInfo. The following constants are defined for digital-video devices:
MCI_DGV_INFO_AUDIO_ALG
Returns the name for the current audio compression algorithm.
MCI_DGV_INFO_AUDIO_QUALITY
Returns the name for the current audio quality descriptor.
MCI_DGV_INFO_STILL_ALG
Returns the name for the current still image compression algorithm.
MCI_DGV_INFO_STILL_QUALITY
Returns the name for the current still image quality descriptor.
MCI_DGV_INFO_USAGE
Returns a string describing usage restrictions that might be imposed by the owner of the visual or audible data in the workspace.
MCI_DGV_INFO_VIDEO_ALG
Returns the name for the current video compression algorithm.
MCI_DGV_INFO_VIDEO_QUALITY
Returns the name for the current video quality descriptor.
MCI_INFO_VERSION
Returns the release level of the device driver and hardware. Device driver developers must document the syntax of the returned string.
MCI_DGV_INFO_TEXT
Obtains the window caption.
MCI_INFO_FILE
Obtains the path and filename of the last file specified with the MCI_OPEN or MCI_LOAD command. If a file has not been specified, the device returns a null-terminated string. This flag is supported only by devices that return TRUE to the MCI_GETDEVCAPS_USES_FILES flag of the MCI_GETDEVCAPS command.

For digital-video devices, lpInfo points to an MCI_DGV_INFO_PARMS structure.

The following additional flags apply to the sequencer device type:

MCI_INFO_COPYRIGHT
Obtains the MIDI file copyright notice from the copyright meta event.
MCI_INFO_FILE
Obtains the filename of the current file. This flag is supported only by devices that return TRUE when you call the MCI_GETDEVCAPS command with the MCI_GETDEVCAPS_USES_FILES flag.
MCI_INFO_NAME
Obtains the sequence name from the sequence/track name meta event.

The following additional flag applies to the vcr device type:

MCI_VCR_INFO_VERSION
Sets lpstrReturn member of the MCI_INFO_PARMS structure to point to the version number. Also sets the dwRetSize member equal to the length of the string pointed to.

The following additional flags apply to the overlay device type:

MCI_INFO_FILE
Obtains the filename of the current file. This flag is supported only by devices that return TRUE to the MCI_GETDEVCAPS_USES_FILES flag of the MCI_GETDEVCAPS command.
MCI_OVLY_INFO_TEXT
Obtains the caption of the window associated with the video-overlay device.

The following additional flags apply to the waveaudio device type:

MCI_INFO_FILE
Obtains the filename of the current file. This flag is supported by devices that return TRUE when you call the MCI_GETDEVCAPS command with the MCI_GETDEVCAPS_USES_FILES flag.
MCI_WAVE_INPUT
Obtains the product name of the current input.
MCI_WAVE_OUTPUT
Obtains the product name of the current output and its value is device specific.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mmsystem.h.

See Also

MCI Overview, MCI Commands, MCI_DGV_INFO_PARMS, MCI_GETDEVCAPS, MCI_INFO_PARMS, MCI_LOAD, I_OPEN