Sent to a waveform output device driver to allocate a specified device for use by a client application.
MMSYSERR_NOTENABLED | The driver failed to load or initialize. |
MMSYSERR_ALLOCATED | The device is already allocated by the maximum number of clients the driver supports, or the device cannot be opened because of system resource limitations other than memory. |
MMSYSERR_NOMEM | The device cannot be opened because of a failure allocating or locking memory. |
WAVERR_BADFORMAT | The device cannot be opened using the specified data format. |
WAVE_FORMAT_QUERY | If this flag is specified, the device driver determines if it supports the format specified by lpFormat in the WAVEOPENDESC structure, but does not actually open the device. If the driver supports the requested format it should return MMSYSERR_NOERROR, otherwise it should return WAVERR_BADFORMAT. |
CALLBACK_EVENT | If this flag is specified, dwCallback in the WAVEOPENDESC structure is assumed to be the handle of an event. |
CALLBACK_FUNCTION | If this flag is specified, dwCallback in the WAVEOPENDESC structure is assumed to be the address of a callback function. |
CALLBACK_THREAD | If this flag is specified, dwCallback in the WAVEOPENDESC structure is assumed to be a handle of a thread. |
CALLBACK_WINDOW | If this flag is specified, dwCallback in the WAVEOPENDESC structure is assumed to be a window handle. |
It is up to the driver to determine the number of clients allowed to use a particular device. Once a device is opened for the maximum number of clients the driver supports, the driver should return MMSYSERR_ALLOCATED for any additional open requests. If the open operation is successful, the driver should use the DriverCallback function to send the client a WOM_OPEN message.
WODM_CLOSE, WAVEOPENDESC