Closing an MCI Driver

A client application using MCI closes a driver by sending an MCI_CLOSE message. This message is intercepted by winmm.dll, which sends the following messages to the appropriate MCI driver, in the order listed:

1.MCI_CLOSE_DRIVER

2.DRV_CLOSE

3.DRV_DISABLE

4.DRV_FREE

Note that the driver does not receive the MCI_CLOSE message. Also be aware that DRV_DISABLE and DRV_FREE are sent only if the calling application is the only one using the driver. After DRV_FREE is sent, winmm.dll unloads the driver from the application’s address space.

For more information, see the following topics:

·Handling MCI_CLOSE_DRIVER

·Handling DRV_CLOSE

·Handling DRV_DISABLE

·Handling DRV_FREE