The DRV_OPEN message requests a user-mode multimedia driver to open a driver instance.
The driver should return a nonzero value if the operation succeeds. Otherwise it should return zero. (See the following Comments section.)
The DRV_OPEN message is one of the standard driver messages. A client sends the message by calling the driver’s DriverProc entry point, passing the specified parameter values.
The nonzero return value is saved by winmm.dll and used as the dwDriverID input value for subsequent calls to DriverProc. Because multiple driver instances can be opened simultaneously, drivers typically use this value to identify driver instance data. For example, the value could be an index into a driver-defined array, where each array element is a local, dynamically allocated structure containing driver instance data. When the driver receives subsequent calls to DriverProc for the open instance, it can use the dwDriverID value to determine which set of instance data to use.
Drivers receive DRV_LOAD and DRV_ENABLE messages before receiving DRV_OPEN.
Audio device drivers receive customized driver messages for opening driver instances. These drivers can ignore DRV_OPEN.