The mciSendCommand function sends a command message to the specified MCI device.
MCIERROR mciSendCommand(
MCIDEVICEID IDDevice,
UINT uMsg,
DWORD fdwCommand,
DWORD dwParam
);
Returns zero if successful or an error otherwise. The low-order word of the returned doubleword value contains the error return value. If the error is device-specific, the high-order word of the return value is the driver identifier; otherwise, the high-order word is zero. For a list of possible return values, see Constants: MCIERR Return Values.
To retrieve a text description of mciSendCommand return values, pass the return value to the mciGetErrorString function.
Error values that are returned when a device is being opened are listed with the MCI_OPEN command message. In addition to the MCI_OPEN error return values, this function can return the values listed in Constants: MCIERR Return Values.
Use MCI_OPEN to obtain the device identifier specified by the IDDevice parameter.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
MCI Overview, MCI Functions, MCI_OPEN, mciGetErrorString