A version of this page is also available for

Windows Embedded CE 6.0 R3


This interface is defined as a replacement for IPersistStream to add an initialization method, InitNew.

This interface is not derived from IPersistStream; it is mutually exclusive with IPersistStream.

An object chooses to support only one of the two interfaces, based on whether it requires the InitNew method. Otherwise, the signatures and semantics of the other methods are the same as the corresponding methods of IPersistStream, except as described below.

When to Implement

Implement this interface on any object that needs to support initialized stream-based persistence, regardless of whatever else the object does. The presence of the InitNew method requires some changes to other methods that are common to IPersistStream, as noted in the method descriptions.

When to Use

Use this interface to initialize a stream-based object and to save that object to a stream.

Methods in Vtable Order

IUnknown method Description


Returns pointers to supported interfaces.


Increments the reference count.


Decrements the reference count.

IPersist method Description


Returns the class identifier (CLSID) for the component object.

IPersistStreamInit method Description


Checks the object for changes since it was last saved.


Initializes an object from the stream where it was previously saved.


Saves an object into the specified stream and indicates whether the object should reset its dirty flag.


Return the size in bytes of the stream needed to save the object.


Initializes an object to a default state.


To determine whether the platform supports this interface, see Determining Supported COM APIs.


Header ocidl.h, ocidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later