Share via


WODM_OPEN (Windows Embedded CE 6.0)

1/6/2010

This message is used in an MMDRV_MESSAGE_PARAMS structure passed to the WAV_IOControl function to request a waveform output driver to open an instance of a specified device.

Parameters

  • uDeviceId
    Device identifier — 0, 1, 2, and so on — for the target device.
  • uMsg
    Specifies this message.
  • dwUser
    Pointer to a location to receive the device instance identifier.
  • dwParam1
    Pointer to a WAVEOPENDESC structure containing the client's device handle, notification target, and instance identifier
  • dwParam2
    Contains the following flags.

    Value Description

    WAVE_FORMAT_DIRECT

    Data compression and decompression take place in hardware.

    WAVE_FORMAT_QUERY

    The driver indicates whether or not it supports the specified format.

Return Values

MMSYSERR_NOERROR indicates success. Otherwise, the driver returns one of the MMSYSERR or WAVEERR error values declared in the Mmsystem.h header file.

Remarks

The waveform API manager sends this message by calling the audio driver's WAV_IOControl entry point through the DeviceIoControl function.

The driver assigns a device instance identifier and returns it in the location pointed to by dwUser. The driver receives this value as the dwUser input parameter of all other waveform output driver messages.

The driver determines the number of clients that it enables to use a particular device. If a device is opened by the maximum number of clients, the driver returns MMSYSERR_ALLOCATED for subsequent open requests.

The WAVE_FORMAT_DIRECT flag is meant for use with a waveform mapper. If the flag is set in dwParam2, the driver does not call the waveform API manager to handle compression or decompression operations; the caller wants the hardware to perform these operations directly. If the hardware is not capable of performing compression or decompression operations, the driver returns MMSYSERR_NOTSUPPORTED when WAVE_FORMAT_DIRECT is set.

If the WAVE_FORMAT_QUERY flag is set in dwParam2, the driver does not open the device. Instead, the driver determines whether it supports the format specified by the lpFormat member of WAVEOPENDESC. If the driver supports the requested format, it returns MMSYSERR_NOERROR. Otherwise, the driver returns WAVERR_BADFORMAT.

If the open operation succeeds, the Wave API Manager sends the ACM a WOM_OPEN message by calling the PostThreadMessage function on the callback thread handle.

Requirements

Header mmddk.h
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Waveform Output Driver Messages
WAV_IOControl
WAVEOPENDESC
MMDRV_MESSAGE_PARAMS

Concepts

Audio Device Instances