Responding to the MCI_STATUS Message

Applications use the MCI_STATUS message to determine the status of a device and device driver. An application will supply a pointer to a MCI_STATUS_PARMS data structure. This structure has the following fields:

typedef struct {

DWORDdwCallback;// Callback for MCI_NOTIFY

DWORDdwReturn;// Information returned to user

DWORDdwItem;// Flag specifying type of information

DWORDdwTrack;// Track number

} MCI_GETDEVCAPS_PARMS;

The dwReturn field of this data structure contains the information returned by your device driver. The MCI_STATUS_ITEM flag sent by the application validates the dwItem field of this data structure. The contents of dwItem specify the type of information requested. The dwTrack field is used for the basic and extended commands. The following constants are always defined for MCI_STATUS:

MCI Constant Description

MCI_STATUS_MODE Requests the current mode of the device. The modes include: MCI_MODE_NOT_READY MCI_MODE_PAUSE MCI_MODE_PLAY MCI_MODE_STOP MCI_MODE_OPEN MCI_MODE_RECORD MCI_MODE_SEEK
MCI_STATUS_READY Requests if the device is ready. Returns TRUE if the device is ready; FALSE otherwise.