Closing All MCI Devices Used by an Application

The following example closes all of the MCI devices that are opened by an application.

UINT wDeviceID;

DWORD dwReturn;

// Closes all MCI devices opened by this application.

// Waits until devices are closed before returning.

if(dwReturn = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT,


// Error, unable to close all devices.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples