The following code illustrates how to start recording at the 5 second position in the current device element, and then overwrite existing data by recording for 5 seconds.
USHORT usDeviceID;
MCI_RECORD_PARMS mrp;
/* Start recording at the 5 second position in the current device
element, and record for 5 seconds, overwriting existing data. */
/* Assumes time format set to milliseconds */
mrp.hwndCallback = hwndMyWindow;
/* Assign hwndCallback the handle to the PM Window */
mrp.ulFrom = (ULONG) 5000; /* Record from position */
mrp.ulTo = (ULONG) 10000; /* Record to position */
mciSendCommand(usDeviceID, /* Device ID */
MCI_RECORD, /* MCI record message */
MCI_NOTIFY | MCI_FROM |
MCI_TO |MCI_RECORD_OVERWRITE,
/* Flags for this message */
(ULONG) &mrp, /* Data structure */
0); /* No user parm */