Share via


ISpTranscript::GetTranscript (Windows Embedded CE 6.0)

1/6/2010

This method gets the current transcript. The string retrieved will be allocated by CoTaskMemAlloc. Applications implementing this method must call CoTaskMemFree to free memory associated with this string.

Syntax

HRESULT GetTranscript(
  WCHAR** ppszTranscript
);

Parameters

  • ppszTranscript
    [out] Address of a pointer to the transcription string.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully. ppszTranscript contains a string allocated by CoTaskMemAlloc.

E_OUTOFMEMORY

Exceeded available memory.

SPERR_UNINITIALIZED

Object has not been initialized.

E_POINTER

ppszTranscript is bad or invalid.

S_FALSE

No transcript is present and ppszTranscript will be NULL.

FAILED(hr)

Appropriate error message.

Example

The following code snippet illustrates the use of this method.

HRESULT hr = S_OK;
// Bind a stream to an existing wavefile
hr = SPBindToFile( FILENAME, SPFM_READ_ONLY, &cpStream);
// Check hr
hr = cpStream.QueryInterface(&cpTranscript);
// Check hr
PWCHAR pwszTranscript;
hr = cpTranscript->GetTranscript(&pwszTranscript);
// Check hr

Requirements

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

See Also

Reference

ISpTranscript
SAPI Interfaces