MCI defines four classifications of commands. The commands and options comprising the following two classifications are defined as the minimum command set for any MCI driver:
System commands are handled directly by MCI rather than by the driver.
Required commands are handled by the driver. All drivers should support the required commands and options.
Regardless of the specific driver you're using, you should be able to assume that the commands and options in the two preceding groups are available.
The commands comprising the following two classifications are not supported by all drivers:
Basic commands, or optional commands, are used by some devices. If a device supports a basic command, it must support a defined set of options for the command.
Extended commands are specific to a certain device types or drivers. Extended commands include new commands (like the MCI_PUT and MCI_WHERE commands for the animation device type) and extensions to existing commands (like the MCI_ANIM_GETDEVCAPS_CAN_STRETCH option added to the MCI_STATUS command for the animation device type).
If you need to use a basic or extended command or option, you should query the device driver before trying to use the command or option (that is, unless you are certain that the MCI driver you've used during development is the same one that will be available on the delivery system). The following tables summarize the specific commands in each category. For a complete description of each of these commands, see the message directory in the Multimedia Programmer's Reference.
MCI directly processes the following system commands rather than passing them to MCI device drivers:
Command | Description |
MCI_BREAK | Sets a break key for an MCI device. |
MCI_SYSINFO | Returns information about MCI devices. |
Required commands must be supported by all MCI device drivers. The following table lists the required commands:
Command | Description |
MCI_CLOSE | Closes the device. |
MCI_GETDEVCAPS | Obtains the capabilities of a device. |
MCI_INFO | Obtains textual information from a device. |
MCI_OPEN | Initializes the device. |
MCI_STATUS | Obtains status information from the device. |
The following table summarizes the basic commands. The use of these commands by a device is optional.
Command | Description |
MCI_LOAD | Loads data from a file. |
MCI_PAUSE | Stops playing. |
MCI_PLAY | Starts transmitting output data. |
MCI_RECORD | Starts recording data. |
MCI_RESUME | Resumes playing or recording on a paused device. |
MCI_SAVE | Saves data to a disk file. |
MCI_SEEK | Seeks forward or backward. |
MCI_SET | Sets the operating state of the device. |
MCI_STATUS | Obtains status information about the device. (Supplements the required MCI_STATUS command with options for devices using linear media with identifiable positions.) |
MCI_STOP | Stops playing or recording. |
Some MCI devices have additional commands or add options to existing commands. While some extended commands only apply to a specific device driver, most of them apply to all drivers of a particular device type. For example, the sequencer command set extends the MCI_SET command to add time formats that are needed by MIDI sequencers.
Unless you are certain that the specific MCI driver you use during development will be available on the delivery system, you should not assume that the device supports the extended commands or options. You can use the MCI_GETDEVCAPS command to determine whether a specific feature is supported. Applications should be ready to handle an MCIERR_UNSUPPORTED_FUNCTION return value.
The following extended commands are available with certain device types:
Command | Device Types | Description |
MCI_CUE | waveaudio | Prepares for playing or recording. |
MCI_DELETE | waveaudio | Deletes a data segment from the media element. |
MCI_ESCAPE | videodisc | Sends custom information to a device. |
MCI_FREEZE | overlay | Disables video acquisition to the frame buffer. |
MCI_PUT | animation overlay | Defines the source, destination, and frame windows. |
MCI_REALIZE | animation | Tells the device to select and realize its palette into a display context of the displayed window. |
MCI_SPIN | videodisc | Starts the disc spinning or stops the disc from spinning. |
MCI_STEP | animation videodisc | Steps the play one or more frames forward or reverse. |
MCI_UNFREEZE | overlay | Enables the frame buffer to acquire video data. |
MCI_UPDATE | animation | Repaints the current frame into the display context. |
MCI_WHERE | animation overlay | Obtains the rectangle specifying the source, destination, or frame area. |
MCI_WINDOW | animation overlay | Controls display window options such as caption text. |