Parameters | DWORD lParam1 | The following standard and command-specific flags apply to all devices: |
MCI_NOTIFY | Specifies that MCI should post the MM_MCINOTIFY message when this command completes. The window that receives this message is specified in the dwCallback field of the data structure identified by lParam2. | |
MCI_TEST | Queries the device to determine if it can execute the command. The device returns an error if it is incapable of executing the command. It returns no error if it can handle the command. MCI returns control to the application without executing the command. | |
MCI_WAIT | Specifies that the status operation should finish before MCI returns control to the application. | |
MCI_STATUS_ITEM | Indicates the dwItem field of the data structure identified by lParam2 contains a constant specifying which status item to obtain. The information about the status item is returned in the dwReturn field of the data structure. The following constants are defined to specify the status item: |
MCI_STATUS_CURRENT_TRACK | The dwReturn field is set to the current track number. Digital-video devices typically return 1. | |
MCI_STATUS_LENGTH | The dwReturn field is set to the total media length. The value returned is the length of the longest active stream. (The length is measured in units of the current time format.) These devices return zero if the workspace is empty. | |
MCI_STATUS_MODE | The dwReturn field is set to the current mode of the device. The modes include the following: | |
MCI_MODE_NOT_READY— | Specifies the device is not ready. | |
MCI_MODE_PAUSE— | Specifies the device is paused. | |
MCI_MODE_PLAY— | Specifies the device is playing. | |
MCI_MODE_STOP— | Specifies the device is stopped. | |
MCI_MODE_OPEN— | Specifies the device is open. | |
MCI_MODE_RECORD— | Specifies the device is recording. | |
MCI_MODE_SEEK— | Specifies the device is seeking. |
If a digital-video device returns not ready, then retrying the command eventually returns one of the other values unless there is a hardware error. During a record or save, the command returns recording or saving respectively. During a step or play, the command returns playing. After a cue has completed, it returns paused. After a step, play, or record has completed, the mode is either stopped or paused depending on the implementation. After a stop or load, and immediately after an open it returns stopped. Digital-video devices do not return open. |
MCI_STATUS_NUMBER_OF_TRACKS | The dwReturn field is set to the total number of playable tracks. Digital-video devices typically return 1. | |
MCI_STATUS_POSITION | The dwReturn field is set to the current position in the current time format units. | |
MCI_STATUS_READY | The dwReturn field is set to TRUE if the device will accept another command; otherwise, it is set to FALSE. Digital-video devices might return FALSE when a hardware error occurs or for a short interval immediately after initiating some commands. The set of commands that cause a temporary not ready status is device specific. | |
MCI_STATUS_TIME_FORMAT | The dwReturn field is set to the current time format of the device. The time formats include: | |
MCI_FORMAT_FRAMES | Specifies frames as the time format. | |
MCI_FORMAT_MILLISECONDS | Specifies milliseconds as the time format. |
All digital-video devices support the frame format. Devices can return other time formats that apply to the device. | ||
MCI_STATUS_START | Obtains the starting position of the media. To get the starting position, combine this flag with MCI_STATUS_ITEM and set the dwItem field of the data structure identified by lParam2 to MCI_STATUS_POSITION. Digital-video devices return the frame number for the first frame in the workspace. It is typically zero or one. | |
MCI_TRACK | Indicates a status track parameter is included in the dwTrack field of the data structure identified by lParam2. You must use this flag with the MCI_STATUS_POSITION or MCI_STATUS_LENGTH constant. Digital-video devices typically have one track. | |
When used with MCI_STATUS_POSITION, MCI_TRACK obtains the starting position of the specified track. For digital-video devices, this command is typically rejected unless one is specified for the track number. In this case it returns the starting position within the track. (This is the same as returned for the MCI_STATUS_START flag.) | ||
When used with MCI_STATUS_LENGTH, MCI_TRACK obtains the length of the specified track. MCI uses continuous track numbers. For digital-video devices, this command is typically rejected unless one is specified for the track number. This combination returns the same value as MCI_STATUS_LENGTH. | ||
LPMCI_DGV_STATUS_PARMS lParam2 | Specifies a far pointer to the MCI_DGV_STATUS_PARMS data structure. (Devices with extended command sets might replace this data structure with a device-specific data structure.) |