다음을 통해 공유


ISpStreamFormat::GetFormat (Windows CE 5.0)

Send Feedback

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.

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 Values

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

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpStreamFormat | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.