다음을 통해 공유


ACMDM_STREAM_OPEN (Windows CE 5.0)

Send Feedback

This message requests an ACM driver either to open a conversion stream or to indicate whether the specified conversion is supported.

Parameters

  • dwDeviceID
    Value that specifies a driver instance identifier. The driver returns this value in response to the ACM_Open (ACM Driver) function.
  • hDriver
    Handle to a driver.
  • uMsg
    Value that specifies this message.
  • lParam1
    Pointer to an ACMDRVSTREAMINSTANCE structure.
  • lParam2
    Not used.

Return Values

A return value of MMSYSERR_NOERROR indicates success. Otherwise, the driver returns one of the MMSYSERR error values declared in the Mmsystem.h header file or one of the ACMERR error values declared in the Msacm.h header file. If a specified conversion is not supported, the driver should return ACMERR_NOTPOSSIBLE.

Remarks

The ACM (Waveapi.dll) sends this message by calling the ACM driver's ACM_IOControl entry point through the DeviceIoControl function. The ACM sends this message when an application calls the acmStreamOpen function. All ACM drivers that provide stream conversions must support this message.

If the client has specified the ACM_STREAMOPENF_QUERY flag, which is contained in the fdwOpen member of ACMDRVSTREAMINSTANCE, the driver should not open a stream instance. Otherwise, the driver returns MMSYSERR_NOERROR if the conversion is possible and MMSYSERR_NOTPOSSIBLE.

When a driver receives this message, it first determines if it can perform the specified conversion. If possible, it performs instance initialization operations for the stream, such as determining which conversion routines to use and allocating instance-specific resources. If the driver supports asynchronous operations and the client has specified the ACM_STREAMOPENF_ASYNC flag, which is contained in the fdwOpen member of ACMDRVSTREAMINSTANCE, the driver sends the client an MM_ACM_OPEN callback message by calling the PostThreadMessage function after the operation completes.

Before calling the driver's ACM_IOControl function, the ACM verifies that the following conditions have been met:

  • The fdwOpen member of ACMDRVSTREAMINSTANCE contains valid flag values.
  • The source and destination WAVEFORMATEX structures are readable.
  • If a WAVEFILTER structure is specified, it is readable, and the source and destination format structures contain identical information.
  • If the client has specified different source and destination format tags, the driver has declared itself to be a codec by setting ACMDRIVERDETAILS_SUPPORTF_CODEC in the fdwSupport member of ACMDRIVERDETAILS.
  • If the client specifies source and destination formats associated with a single format tag, the driver declares itself to be a converter by setting ACMDRIVERDETAILS_SUPPORTF_CONVERTER in the fdwSupport member of ACMDRIVERDETAILS.
  • If the client specifies a filter operation, the driver declares itself to be a filter by setting ACMDRIVERDETAILS_SUPPORTF_FILTER in the fdwSupport member of ACMDRIVERDETAILS.

If the client specifies the ACM_STREAMOPENF_NONREALTIME flag, which is contained in the fdwOpen member of ACMDRVSTREAMINSTANCE, the driver can perform the conversion without time constraints. However, if this flag is not specified and the driver cannot perform the conversion in real time, it returns ACMERR_NOTPOSSIBLE.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Msacmdrv.h.

See Also

ACMDM_DRIVER_DETAILS | ACM_Open (ACM Driver) | ACMDRVSTREAMINSTANCE | ACM_IOControl | ACM Driver Messages

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.