Changing the Current Position

To change the current position in a device element, use the MCI_SEEK command along with the MCI_TO flag and the MCI_SEEK_PARMS parameter block. MMSYSTEM.H defines the MCI_SEEK_PARMS parameter block as follows:

typedef struct {
        DWORD        dwCallback;                        /* callback for MCI_NOTIFY flag */
        DWORD        dwTo;                                /* seek position */
} MCI_SEEK_PARMS;

If you use the dwTo field to specify a seek position with MCI_SEEK, you should query the time format and set it if necessary.

In addition to specifying a position with the dwTo field, you can specify the MCI_SEEK_TO_START or MCI_SEEK_TO_END flags for the dwParam1 parameter of mciSendCommand to seek to the starting and ending positions of the device element. If you use one of these flags, don't specify the MCI_TO flag.