The MXDM_OPEN message requests a user-mode mixer driver to open an instance of the specified device.
The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR or MIXERR error codes defined in mmsystem.h. See mixerOpen return values in the Win32 SDK.
A client sends the MXDM_OPEN message by calling the user-mode driver’s mxdMessage entry point, passing the specified parameters.
Often, creating a driver instance simply entails creating an instance-specific data structure. The instance identifier can be a handle to this structure.
Even though the description of mixerOpen in the Win32 SDK lists numerous flag values, these flags are handled within winmm.dll.
According to the description of mixerOpen in the Win32 SDK, the only acceptable callback target is a window handle. Code within winmm.dll pre-empts this callback target by placing the address of a local callback function in the MIXEROPENDESC structure, and setting the CALLBACK_FUNCTION flag in lParam2. The driver calls DriverCallback at the appropriate times, specifying the callback function. The callback function, within winmm.dll, then sends a callback message to the client-specified window handle.