MCI_GETDEVCAPS command

The MCI_GETDEVCAPS command retrieves static information about a device. All devices recognize this command. The parameters and flags available for this command depend on the selected device. Information is returned in the dwReturn member of the structure identified by lpCapsParms.

To send this command, call the mciSendCommand function with the following parameters.

MCIERROR mciSendCommand(
  MCIDEVICEID wDeviceID, 
  MCI_GETDEVCAPS, 
  DWORD dwFlags, 
  (DWORD) (LPMCI_GETDEVCAPS_PARMS) lpCapsParms
);

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.

lpCapsParms

Pointer to an MCI_GETDEVCAPS_PARMS structure.

Return Value

Returns zero if successful or an error otherwise.

Remarks

The following additional standard and command-specific flags apply to all devices supporting MCI_GETDEVCAPS:

MCI_GETDEVCAPS_COMPOUND_DEVICE

The dwReturn member is set to TRUE if the device uses data storage that must be explicitly opened and closed; it is set to FALSE otherwise.

MCI_GETDEVCAPS_DEVICE_TYPE

The dwReturn member is set to one of the values listed in MCI Device Types.

MCI_GETDEVCAPS_HAS_AUDIO

The dwReturn member is set to TRUE if the device has audio output; it is set to FALSE otherwise.

MCI_GETDEVCAPS_HAS_VIDEO

The dwReturn member is set to TRUE if the device has video output; it is set to FALSE otherwise. For example, the member is set to TRUE for devices that support the videodisc command set.

MCI_GETDEVCAPS_ITEM

Specifies that the dwItem member of the MCI_GETDEVCAPS_PARMS structure contains one of the following constants:

MCI_GETDEVCAPS_CAN_EJECT

The dwReturn member is set to TRUE if the device can eject the media; otherwise, it is set to FALSE.

MCI_GETDEVCAPS_CAN_PLAY

The dwReturn member is set to TRUE if the device can play the media; otherwise, it is set to FALSE. If a device specifies TRUE, it implies the device supports the MCI_PAUSE and MCI_STOP commands as well as the MCI_PLAY command.

MCI_GETDEVCAPS_CAN_RECORD

The dwReturn member is set to TRUE if the device supports recording; otherwise, it is set to FALSE. If a device specifies TRUE, it implies the device supports the MCI_PAUSE and MCI_STOP commands as well as the MCI_RECORD command.

MCI_GETDEVCAPS_CAN_SAVE

The dwReturn member is set to TRUE if the device can save a file; otherwise, it is set to FALSE.

MCI_GETDEVCAPS_USES_FILES

The dwReturn member is set to TRUE if the device requires a filename; it is set to FALSE otherwise. Only compound devices use files.

The following flags can be specified in the dwItem member of MCI_GETDEVCAPS_PARMS for the digitalvideo device type:

MCI_DGV_GETDEVCAPS_CAN_FREEZE

The dwReturn member is set to TRUE if the device can freeze frames; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_CAN_LOCK

The dwReturn member is set to TRUE if the device can lock; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_CAN_REVERSE

The dwReturn member is set to TRUE if the device can play in reverse; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_CAN_STR_IN

The dwReturn member is set to TRUE if the device can stretch input; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_CAN_STRETCH

The dwReturn member is set to TRUE if the device can stretch an image; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_CAN_TEST

The dwReturn member is set to TRUE if the device can perform tests; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_HAS_STILL

The dwReturn member is set to TRUE if the device can display still images; otherwise, it is set to FALSE.

MCI_DGV_GETDEVCAPS_MAX_WINDOWS

The dwReturn member is set to the maximum number of windows that the device can handle simultaneously.

MCI_DGV_GETDEVCAPS_MAXIMUM_RATE

The dwReturn member is set to the maximum play rate for the device, in frames per second.

MCI_DGV_GETDEVCAPS_MINIMUM_RATE

The dwReturn member is set to the minimum play rate for the device, in frames per second.

MCI_DGV_GETDEVCAPS_PALETTES

The dwReturn member is set to TRUE if the device can return a palette handle; otherwise, it is set to FALSE.

The following flags can be specified in the dwItem member of MCI_GETDEVCAPS_PARMS for the vcr device type:

MCI_GETDEVCAPS_CLOCK_INCREMENT_RATE

The dwReturn member is set to the number of increments per second.

MCI_VCR_GETDEVCAPS_CAN_DETECT_LENGTH

The dwReturn member is set to TRUE if the device is capable of detecting the length of the media; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_CAN_FREEZE

The dwReturn member is set to TRUE if the device is capable of freezing the output image; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_CAN_MONITOR_SOURCES

The dwReturn member is set to TRUE if the device is capable of monitoring sources; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_CAN_PREROLL

The dwReturn member is set to TRUE if the device is capable of preroll; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_CAN_PREVIEW

The dwReturn member is set to TRUE if the device is capable of previews; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_CAN_REVERSE

The dwReturn member is set to TRUE if the device is capable of playing in reverse; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_CAN_TEST

The dwReturn member is set to TRUE if the device is capable of testing; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_HAS_CLOCK

The dwReturn member is set to TRUE if the device supports an external clock; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_HAS_TIMECODE

The dwReturn member is set to TRUE if device has timecode capability or if this capability is unknown; otherwise, it is set to FALSE.

MCI_VCR_GETDEVCAPS_NUMBER_OF_MARKS

The dwReturn member is set to the number of marks (99).

MCI_VCR_GETDEVCAPS_SEEK_ACCURACY

The dwReturn member is set to the seek accuracy of the device.

The following flags can be specified in the dwItem member of MCI_GETDEVCAPS_PARMS for the overlay device type:

MCI_OVLY_GETDEVCAPS_CAN_FREEZE

The dwReturn member is set to TRUE if the device can freeze the image; otherwise, it is set to FALSE.

MCI_OVLY_GETDEVCAPS_CAN_STRETCH

The dwReturn member is set to TRUE if the device can stretch the image to fill the frame; otherwise, it is set to FALSE.

MCI_OVLY_GETDEVCAPS_MAX_WINDOWS

The dwReturn member is set to the maximum number of windows that the device can handle simultaneously.

The following flags can be specified in the dwItem member of MCI_GETDEVCAPS_PARMS for the videodisc device type:

MCI_VD_GETDEVCAPS_CAN_REVERSE

The dwReturn member is set to TRUE if the videodisc player can play in reverse; otherwise, it is set to FALSE. Some players can play CLV discs in reverse as well as CAV discs.

MCI_VD_GETDEVCAPS_CAV

When combined with other items, specifies that the return information applies to CAV format videodiscs. This is the default if no videodisc is inserted.

MCI_VD_GETDEVCAPS_CLV

When combined with other items, specifies that the return information applies to CLV format videodiscs.

MCI_VD_GETDEVCAPS_FAST_RATE

The dwReturn member is set to the standard fast play rate in frames per second.

MCI_VD_GETDEVCAPS_NORMAL_RATE

The dwReturn member is set to the normal play rate in frames per second.

MCI_VD_GETDEVCAPS_SLOW_RATE

The dwReturn member is set to the standard slow play rate in frames per second.

The following flags can be specified in the dwItem member of MCI_GETDEVCAPS_PARMS for the waveaudio device type:

MCI_WAVE_GETDEVCAPS_INPUT

The dwReturn member is set to the total number of waveform input (recording) devices.

MCI_WAVE_GETDEVCAPS_OUTPUT

The dwReturn member is set to the total number of waveform output (playback) devices.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Mmsystem.h (include Windows.h)

See also

MCI

MCI Commands