ISpStream::SetBaseStream
Other versions of this page are also available for the following:
8/28/2008
This method initializes the ISpStream object with an IStream object to encapsulate, and the format of the IStream object.
Syntax
HRESULT SetBaseStream(
IStream* pStream,
REFGUID rguidFormat,
const WAVEFORMATEX* pWaveFormatEx
);
Parameters
- pStream
[in] Pointer to an IStream object containing the base stream data.
- rguidFormat
[in] Data format identifier associated with the stream.
- pWaveFormatEx
[in] Pointer to the WAVEFORMATEX structure that contains the wave file format information. If rguidFormat has a value of SPDFID_WaveFormatEx, this parameter must point to a valid WAVEFORMATEX structure. For other formats, the parameter should be NULL.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
E_INVALIDARG |
One or more arguments are invalid. |
SPERR_ALREADY_INITIALIZED |
The object has already been initialized. |
FAILED(hr) |
Appropriate error message. |
Remarks
The helper class CSpStreamFormat and the SPSTREAMFORMAT enumeration can be used to avoid the possibility of typos or mistakes when filling in the WAVEFORMATEX structure.
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |