Handling DRV_OPEN

When winmm.dll sends the DRV_OPEN message, it sets the DriverProc parameters as follows:

dwDriverID
Zero.
hDriver
The driver’s handle.
uMsg
DRV_OPEN.
lParam1
Contains a pointer to a zero-terminated string. The string contains any characters that follow the filename in the system registry.
lParam2
Pointer to an MCI_OPEN_DRIVER_PARMS structure.

The value of the lpstrParams member of MCI_OPEN_DRIVER_PARMS is the same as the value of lParam1.

Before DriverProc returns, you must:

The driver can also perform instance-specific operations for the device being opened.