The following code illustrates how to close a device context.

   USHORT usDeviceID;                       /* Device ID              */
   MCI_GENERIC_PARMS mciGenericParms;       /* Generic message
                                               parms structure        */

                                            /* Close a device context */
   mciSendCommand( usDeviceID,              /* Device ID to close     */
                   MCI_CLOSE,               /* MCI close message      */
                   MCI_WAIT,                /* Flag for this message  */
                   (PVOID) &mciGenericParms,/* Data structure         */
                   0);                      /* No user parameter      */


[Back] [Next]