ISpStream::SetBaseStream (Windows CE 5.0)
This method initializes the ISpStream object with an IStream object to encapsulate, and the format of the IStream object.
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 Values
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
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
Send Feedback on this topic to the authors