The following required commands are recognized by all devices. Extended commands can add other options to these commands.
Commands Supported by All MCI Devices
Command | Description |
capability item | Requests information about a particular capability of a device. While other capabilities are defined for specific devices and device types, the following items are always available: | ||
can eject Returns true if the device can eject the media. | |||
can play Returns true if the device can play. | |||
can record Returns true if the device supports recording. | |||
can save Returns true if the device can save data. | |||
compound device Returns true if the device requires an element name. | |||
device type Returns one of the following: | |||
animation cdaudio dat digitalvideo other overlay scanner sequencer vcr videodisc waveaudio | |||
has audio Returns true if the device supports audio playback. | |||
has video Returns true if the device supports video. | |||
uses files Returns true if the element of a compound device is a file pathname. | |||
close | When sent to a simple device, closes the device. When sent to a compound device element, closes the element. | ||
info item | Fills a user-supplied buffer with information. One of the following items modifies info: | ||
product Returns a null-terminated string with description of the hardware associated with a device. This usually includes the manufacturer and model information. | |||
open items | Initializes the device. The following optional items modify open: | ||
alias device_ alias Specifies an alternate name for the given device. If specified, it must be used for subsequent references to the device. | |||
shareable Initializes the device or element as shareable. Subsequent attempts to open it fail unless you specify shareable in both the original and later open commands. MCI returns an error if it is already open and not shareable. | |||
type device_ type Specifies the device type of a device element. As an alternative to type, MCI can use the [mci extension] entries in the SYSTEM.INI file to select the device based on the extension used by the device element. | |||
status item | Obtains status information for the device. One of the following items modifies status: | ||
mode Returns the current mode of the device. All devices can return: not ready, paused, playing, and stopped. The modes open, parked, recording, and seeking are device dependent. | |||
ready Returns true if the device is ready. |