The MCI_BREAK command sets a break key for an MCI device. MCI supports this command directly rather than passing it to the device. Any MCI application can use this command.
MCIERROR mciSendCommand(MCIDEVICEID wDeviceID, MCI_BREAK,
DWORD dwFlags, (DWORD) (LPMCI_BREAK_PARMS) lpBreak);
Returns zero if successful or an error otherwise.
You might have to press the break key multiple times to interrupt a wait operation. Pressing the break key after a device wait is canceled can send the break to an application. If an application has an action defined for the virtual-key code, then it can inadvertently respond to the break. For example, an application using VK_CANCEL for an accelerator key can respond to the default CTRL+BREAK key if it is pressed after a wait is canceled.
The following additional flags apply to all devices:
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
MCI Overview, MCI Commands, MCI_BREAK_PARMS