MCI_DELETE

The MCI_DELETE command removes data from the file. Digital-video and waveform-audio devices recognize this command.

To send this command, call the mciSendCommand function with the following parameters.

MCIERROR mciSendCommand(
  MCIDEVICEID wDeviceID, 
  MCI_DELETE, 
  DWORD dwFlags, 
  (DWORD) (LPMCI_GENERIC_PARMS) lpDelete
);

Parameters

wDeviceID

Device identifier of the MCI device that is to receive the command message.

dwFlags

MCI_NOTIFY, MCI_WAIT, or, for digital-video devices, MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.

lpDelete

Pointer to an MCI_GENERIC_PARMS structure. (Devices with extended command sets might replace this structure with a device-specific structure.)

Return Values

Returns zero if successful or an error otherwise.

Remarks

The following flags apply to the digitalvideo device type:

MCI_DGV_DELETE_AT

A rectangle is included in the rc member of the structure identified by lpDelete. The rectangle specifies the portion of each frame to delete. When this flag is used, the frame is retained in the workspace and the area specified by the rectangle becomes black. If the flag is omitted, MCI_DELETE defaults to the entire frame and removes the frame from the workspace.

MCI_DGV_DELETE_AUDIO_STREAM

An audio-stream number is included in the dwAudioStream member of the structure identified by lpDelete. If you use this flag and also want to delete video, you must also use the MCI_DGV_DELETE_VIDEO_STREAM flag. (If neither flag is specified, data from all audio and video streams is deleted.)

MCI_DGV_DELETE_VIDEO_STREAM

A video-stream number is included in the dwVideoStream member of the structure identified by lpDelete. If you use this flag and also want to delete audio, you must also use the MCI_DGV_DELETE_AUDIO_STREAM flag. (If neither flag is specified, data from all audio and video streams is deleted.)

MCI_FROM

A starting location is included in the dwFrom member of the structure identified by lpDelete. The units assigned to the position values are specified with the MCI_SET_TIME_FORMAT flag of the MCI_SET command.

MCI_TO

An ending location is included in the dwTo member of the structure identified by lpDelete. The units assigned to the position values are specified with the MCI_SET_TIME_FORMAT flag of MCI_SET.

For digital-video devices, the lpDelete parameter points to an MCI_DGV_DELETE_PARMS structure.

The following flags apply to the waveaudio device type:

MCI_FROM

A starting location is included in the dwFrom member of the structure identified by lpDelete. The units assigned to the position values are specified with the MCI_SET_TIME_FORMAT flag of MCI_SET.

MCI_TO

An ending location is included in the dwTo member of the structure identified by lpDelete. The units assigned to the position values are specified with the MCI_SET_TIME_FORMAT flag of MCI_SET.

For waveform-audio devices, the lpDelete parameter points to an MCI_WAVE_DELETE_PARMS structure.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Mmsystem.h; include Windows.h.

See Also

MCI, MCI Commands, MCI_DGV_DELETE_PARMS, MCI_GENERIC_PARMS, MCI_SET, MCI_WAVE_DELETE_PARMS