Microsoft Windows CE 3.0  

WIDM_OPEN

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This message is used in an MMDRV_MESSAGE_PARAMSstructure passed to the WAV_IOControlfunction to request a waveform input 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
Specifies a pointer to a location to receive the device instance identifier.
dwParam1
Specifies a pointer to a WAVEOPENDESCstructure containing the client's device handle, notification target, and instance identifier.
dwParam2
Contains one or both of the following flags:
Value Description
WAVE_FORMAT_DIRECT Data compression and decompression should 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 error values MMSYSERR or WAVERR declared in the Mmsystem.h header file.

Remarks

The ACM sends this message by calling the audio driver's WAV_IOControlentry point through the DeviceIoControlfunction.

The driver assigns a device instance identifier and returns it in the location pointed to by the parameter dwUser. The driver receives this value as the input parameter dwUserto all other wave input 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, it returns MMSYSERR_ALLOCATED for subsequent open requests.

The WAVE_FORMAT_DIRECT flag is meant for use with a wave mapper. If the flag is set in dwParam2, the driver does not call the ACM to handle compression and decompression operations; the caller sets that flag to indicate that the driver uses the hardware to perform these operations directly. If the hardware is not capable of performing the 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, it determines whether it supports the format specified by the lpFormatmember 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 the WIM_OPEN message by calling the PostThreadMessagefunction on the callback thread handle.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.