Rediger

Del via


CPersistStream.Save method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Saves the filter's data to the given stream.

Syntax

HRESULT Save(
   LPSTREAM pStm,
   BOOL     fClearDirty
);

Parameters

pStm

Pointer to the stream to which data is to be saved.

fClearDirty

Flag that indicates whether to reset the current stream's dirty flag; TRUE means to reset it. (When the method is called as part of a Save operation, the value is typically TRUE; when called as part of a Save As operation, the value is typically FALSE.)

Return value

Returns an HRESULT value.

Remarks

This member function implements the IPersistStream::Save method. It calls WriteInt with the software version, calls CPersistStream::WriteToStream with the stream in pStm, and resets mPS_fDirty.

Requirements

Requirement Value
Header
Pstream.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CPersistStream Class