MCI_COPY copies the range of media data specified by the ulFrom and ulTo fields in the MCI_EDIT_PARMS data structure to an application-supplied buffer or the system clipboard. If the pBuff field of the data structure contains a pointer and the MCI_TO_BUFFER flag is specified, the data is copied to a buffer. If the MCI_FROM_BUFFER flag is specified, the information is copied from the buffer to the clipboard.
The units of the MCI_FROM and MCI_TO parameters are interpreted in the currently selected time format. If neither MCI_FROM nor MCI_TO are specified, the range is assumed from the current file position to the end of the file. The difference between MCI_FROM and MCI_TO must be greater than zero, otherwise an error is returned.
Edited Audio/Video Interleaved (AVI) movie files cannot always be saved with their original name after a copy operation. If the clipboard contains a reference to data that would be erased during saving or if another instance of the digital video device has a pending paste operation which depends on this data, the file cannot be saved unless a new file name has been provided. If a new file name is not provided, MMIOERR_NEED_NEW_FILENAME is returned by the AVI I/O procedure and a temporary file is created to save the edited movie.
Note: AVI is the only video file format supporting editing commands.
If data is already in the clipboard, then it is overwritten. If a copy interrupts an in-progress operation, such as play, the operation is aborted and an MM_MCINOTIFY message is sent to the application.
If an invalid buffer length is passed in, ulBufLen is updated with the correct length.
Waveaudio Specific
If MCI_FROM_BUFFER or MCI_TO_BUFFER are used, the pHeader field of MCI_EDIT_PARMS must contain a pointer to an MMAUDIOHEADER structure. The ulBufLen field of MCI_EDIT_PARMS must be filled in.