Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MCI_CLOSE command

The MCI_CLOSE command releases access to a device or file. All devices recognize this command.

To send this command, call the mciSendCommand function with the following parameters.



MCIERROR mciSendCommand(
  MCIDEVICEID wDeviceID, 
  MCI_CLOSE, 
  DWORD dwFlags, 
  (DWORD) (LPMCI_GENERIC_PARMS) lpClose
);


Parameters

wDeviceID

Device identifier of the MCI device that is to receive the command message.

dwFlags

MCI_NOTIFY or MCI_WAIT. For information about these flags, see The Wait, Notify, and Test Flags.

lpClose

Pointer to an MCI_ GENERIC_ PARMS structure. (You can also use an MCI_CLOSE_PARMS structure. For more information, see the comments forMCI_GENERIC_PARMS.)

Return Value

Returns zero if successful or an error otherwise.

Remarks

Exiting an application without closing any MCI devices it has opened can leave the device inaccessible. Your application should explicitly close each device or file when it is finished with it. MCI unloads the device when all instances of the device or all associated files are closed.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

See also

MCI
MCI Commands

 

 

Show: