The close command closes the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed. All MCI devices recognize this command.
To send this command, call the mciSendString function with the lpszCommand parameter set as follows.
_stprintf_s( lpszCommand, TEXT("close %s %s"), lpszDeviceID, lpszFlags );
Identifier of an MCI device. This identifier or alias is assigned when the device is opened.
Can be "wait", "notify", or both. For more information about these flags, see The Wait, Notify, and Test Flags.
Returns zero if successful or an error otherwise.
To close all devices opened by your application, specify the "all" device identifier for the lpszDeviceID parameter.
Closing the cdaudio device stops audio playback.
Windows 2000/XP: If the cdaudio device is playing, closing the cdaudio device does not cause the audio to stop playing. Send the stop command first.
The following command closes the "mysound" device.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|