Applications use the basic flags of the MCI_STATUS message to determine the statistics for the device media. An application will supply a pointer to a MCI_STATUS_PARMS data structure. The MCI_STATUS_PARMS data structure was introduced with the required command messages. The following constants are defined for the dwItem field of the MCI_STATUS_PARMS data structure in addition to the constants defined previously:
MCI Constant | Description |
MCI_STATUS_CURRENT_TRACK | Requests the current track number. MCI uses continuous track numbers. |
MCI_STATUS_LENGTH | Requests the total media length or track length. |
MCI_STATUS_NUMBER_OF_TRACKS | Requests the total number of playable tracks. |
MCI_STATUS_POSITION | Requests the current position in the media or track. |
MCI_STATUS_READY | Requests if the device is ready. Returns TRUE if the device is ready; FALSE otherwise. |
MCI_STATUS_TIME_FORMAT | Requests the current time format of the device. The time formats include: MCI_FORMAT_BYTES MCI_FORMAT_FRAMES MCI_FORMAT_HMS MCI_FORMAT_MILLISECONDS MCI_FORMAT_MSF MCI_FORMAT_SAMPLES MCI_FORMAT_TMSF |
The MCI_STATUS_START flag requests that the position of the start of the media should be returned. This flag will be accompanied by the MCI_STATUS_ITEM flag and the dwItem field will contain MCI_STATUS_POSITION.
The MCI_TRACK flag validates the dwTrack field of the data structure. This flag modifies the meaning of the MCI_STATUS_POSITION or MCI_STATUS_LENGTH constants. When used with MCI_STATUS_POSITION, the application is requesting the starting position of the specified track. When used with MCI_STATUS_LENGTH, the application is requesting the length of the specified track.