Share via


ISpMMSysAudio::Write

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method writes data to the audio device. The audio device should not be directly manipulated when performing speech recognition (see ISpRecognizer).

Syntax

HRESULT Write( 
  const void* pv, 
  ULONG cb,
  ULONG* pcbWritten
);

Parameters

  • pv
    [in] Pointer to data to write to the audio device. A valid pointer must be provided for this parameter, even when cb is zero.
  • cb
    [in] Number of bytes of data to attempt to write to the audio device. This value can be zero.
  • pcbWritten
    [out] Pointer to the actual number of bytes written to the audio device. If set to NULL, no byte value is written.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

SPERR_AUDIO_STOPPED

Multimedia device has been stopped.

E_OUTOFMEMORY

Exceeded available memory.

E_POINTER

At least one of pcbWritten or pv are invalid or bad.

STG_E_ACCESSDENIED

Multimedia device is write-only and no bytes will be written. Error will occur when writing to an input device.

FAILED(hr)

Appropriate error message.

Requirements

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpMMSysAudio
SAPI Interfaces