The following code illustrates how to start a videodisc spinning and request notification upon completion.
/* Start the videodisc spinning, requesting notification of
completion */
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_SPIN, /* MCI spin message */
MCI_NOTIFY | MCI_SPIN_UP, /* Flags for this message */
(PVOID) &mciGenericParms, /* Data structure */
0 ); /* No user parm */