Command messages are used by the command message interface and specified with mciSendCommand. Most command messages have corresponding string commands that are used by the command string interface and specified with mciSendString. Command messages are sent either to a logical device or to the system. The following table lists the command messages sent to devices. Commands that cause asynchronous responses to be generated, such as cue point and position advise, can be called using the appropriate string command; however, their responses are returned to window procedures.
┌────────────────────────┬────────────────────────────────────┐ │Command Messages │ │ │Supported by All Devices│ │ ├────────────────────────┼────────────────────────────────────┤ │MCI_OPEN │Establishes a specific instance of a│ │ │multimedia device or file. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_GETDEVCAPS │Gets the capabilities of a device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_INFO │Gets textual information from the │ │ │device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_STATUS │Gets the current status of the │ │ │device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CLOSE │Closes the device. │ ├────────────────────────┼────────────────────────────────────┤ │Device Setup Command │ │ │Messages │ │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SET │Changes the configuration of the │ │ │device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CONNECTOR │Enables, disables, or queries the │ │ │state of a connector. │ ├────────────────────────┼────────────────────────────────────┤ │Playback and Recording │ │ │Command Messages │ │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CUE │Prerolls a device for playing or │ │ │recording. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SEEK │Seeks to a specified position in the│ │ │file. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_PLAY │Begins transmitting output data. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_RECORD │Begins recording data from the │ │ │specified position. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_PAUSE │Suspends the playing or recording │ │ │operation. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_RESUME │Resumes the playing or recording │ │ │operation. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_STOP │Stops the playing or recording │ │ │operation. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_LOAD │Loads a data element into a media │ │ │device. An example of a data element│ │ │is a waveform file. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SAVE │Saves the current file to disk. │ ├────────────────────────┼────────────────────────────────────┤ │Synchronization Command │ │ │Messages │ │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SET_CUEPOINT │Sets run-time cue points. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SET_POSITION_ADVISE │Advises the application when time │ │ │elapses or position changes. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SET_SYNC_OFFSET │Biases MCI_PLAY starting positions │ │ │and MCI_SEEK target positions for │ │ │group operations. │ ├────────────────────────┼────────────────────────────────────┤ │Device-Specific Command │ │ │Messages │ │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CAPTURE │Captures the current video image and│ │ │stores it as an image device │ │ │element. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_ESCAPE │Sends a custom message directly to │ │ │the media driver. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_GETIMAGEBUFFER │Gets the contents of the capture │ │ │video buffer or the current movie │ │ │frame. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_GETTOC │Gets a contents structure for the │ │ │currently loaded CD-ROM disc. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_PUT │Sets the source and destination │ │ │rectangles for the transformation of│ │ │the video image. It also sets the │ │ │size and position of the default │ │ │video. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_REWIND │Seeks the media to the beginning │ │ │point. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SETTUNER │Causes the digital video MCD to │ │ │change the frequency the tuner │ │ │device is tuned to. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SPIN │Spins the videodisc player up or │ │ │down. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_STEP │Advances or backs up the videodisc │ │ │player one or more frames. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_WHERE │Returns the source and destination │ │ │rectangles set by MCI_PUT. It also │ │ │returns the size and position of the│ │ │video window. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_WINDOW │Specifies the window in which to │ │ │display video output, and controls │ │ │the visibility of the default video │ │ │window. │ ├────────────────────────┼────────────────────────────────────┤ │Editing Command Messages│ │ ├────────────────────────┼────────────────────────────────────┤ │MCI_COPY │Copies specified data range into │ │ │clipboard or buffer. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CUT │Removes specified data range and │ │ │places it into clipboard or buffer. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_DELETE │Deletes specified data range. │ │ │Clipboard or buffer is not used. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_PASTE │Deletes selected data range if │ │ │difference between FROM and TO is │ │ │more than zero, then inserts data │ │ │from buffer or clipboard. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_REDO │Reverses previous MCI_UNDO command. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_UNDO │Cancels previous RECORD, CUT, PASTE,│ │ │or DELETE. │ └────────────────────────┴────────────────────────────────────┘
The following table lists the system command messages specified with mciSendCommand.
┌────────────────────────┬────────────────────────────────────┐ │MCI_DEVICESETTINGS │Provides a media control interface │ │ │driver the opportunity to insert │ │ │custom settings pages. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_GROUP │Makes and breaks device group │ │ │associations. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_MASTERAUDIO │Sets the system master volume and │ │ │toggles speakers and headphones. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_SYSINFO │Gets and sets device and system │ │ │information. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CONNECTORINFO │Gets information regarding the │ │ │number and types of connectors │ │ │defined for a device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_DEFAULT_CONNECTION │Makes, breaks, or queries default │ │ │connections established for a │ │ │device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_CONNECTION │Gets the device context connection │ │ │or establishes an alias for a │ │ │connected device. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_ACQUIREDEVICE │Acquires a device for use. │ ├────────────────────────┼────────────────────────────────────┤ │MCI_RELEASEDEVICE │Releases a device from use. │ └────────────────────────┴────────────────────────────────────┘