Share via


ISpStreamFormat::GetFormat (Windows Embedded CE 6.0)

1/6/2010

This method gets the cached format of the stream. The data is used by SAPI to determine how to handle the stream data present in the underlying IStream object.

Syntax

HRESULT GetFormat(
  GUID* pguidFormatId,
  WAVEFORMATEX** ppCoMemWaveFormatEx
);

Parameters

  • pguidFormatId
    [in] Pointer to the data format identifier associated with the stream. The identifier is typically either SPDFID_Text or SPDFID_WaveFormatEx.
  • ppCoMemWaveFormatEx
    [out] Address of a pointer to a WAVEFORMATEX data structure that receives the wave file format information. This is only applicable when the return GUID is SPDFID_WaveFormatEx. SAPI allocates the memory for the WAVEFORMATEX data structure using CoTaskMemAlloc, but it is the caller's responsibility to call CoTaskMemFree on the returned WAVEFORMATEX pointer.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_POINTER

Pointer is locating a memory block that is NULL or either too small or is not writable.

SPERR_UNINITIALIZED

The object has not been properly initialized.

SPERR_STREAM_CLOSED

The stream is closed or unavailable.

Requirements

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

See Also

Reference

ISpStreamFormat
SAPI Interfaces