MCI_STOP

The MCI_STOP command stops all play and record sequences, unloads all play buffers, and ceases display of video images. CD audio, digital-video, MIDI sequencer, videodisc, VCR, and waveform-audio devices recognize this command.

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

MCIERROR mciSendCommand(
  MCIDEVICEID wDeviceID, 
  MCI_STOP, 
  DWORD dwFlags, 
  (DWORD) (LPMCI_GENERIC_PARMS) lpStop
);

Parameters

wDeviceID

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

dwFlags

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

lpStop

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 difference between the MCI_STOP and MCI_PAUSE commands depends on the device. If possible, MCI_PAUSE suspends device operation but leaves the device ready to resume play immediately.

For the CD audio device, MCI_STOP resets the current track position to zero; in contrast, MCI_PAUSE maintains the current track position, anticipating that the device will resume playing.

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_GENERIC_PARMS, MCI_PAUSE