Communicating with MCI Devices

You can communicate with MCI devices using messages or command strings. Messages are used directly by MCI; MCI converts command strings into messages that it then sends to the device handler. Use these functions to send messages or command strings to MCI, to get the ID assigned to a device, and to get a textual description of an MCI error:

mciSendCommand

Sends a command message to MCI.

mciSendString

Sends a command string to MCI.

mciExecute

A simple version of mciSendString. Errors are displayed automatically in a dialog box.

mciGetDeviceID

Returns the device ID assigned when the device was opened.

mciGetErrorString

Returns the error string corresponding to an MCI error return value.

Most of the MCI functionality is expressed in its command set. See Chapter 4, “Message Overview,” and Chapter 5, “Message Directory,” for an overview and reference to all MCI command messages. MCI command messages are prefixed with MCI.

In addition to its message-based interface, MCI has a string-based interface. Chapter 7, “MCI Command Strings,” describes the MCI command strings.