The following code illustrates how to pause a device and request notification when the operation is completed.
/* Pause the device, requesting notification when operation completes */
#define UP_PAUSE 1
USHORT usDeviceID;
HWND hwndMyWindow;
MCI_GENERIC_PARMS mciGenericParms; /* Generic message
parms structure */
/* Assign hwndCallback the handle to the PM Window */
mciGenericParms.hwndCallback = hwndMyWindow;
mciSendCommand(usDeviceID, /* Device ID */
MCI_PAUSE, /* MCI pause message */
MCI_NOTIFY, /* Flag for this message */
(PVOID) &mciGenericParms, /* Data structure */
UP_PAUSE); /* User parameter to be returned
on notification message */