|
IPersist
The IPersist interface is the base interface for three other persistence-related
interfaces: IPersistStorage, IPersistStream, and IPersistFile. These three interfaces are offered by objects that can serialize themselves
to a storage, stream, or file. That is, they can save their state for later
instantiations, and they can load their saved state, thus transitioning from a
passive to a running state.
Typically, the persistence interfaces are implemented by an embedded or linked
object. The container application or the default object handler calls the
methods in one of the persistence interfaces to have the object save or load
itself. Thus, the object that offers a persistence interface can change itself to an
active or running state by request of its container application or its object
handler.
The IPersist interface is the base from which the other persistence interfaces are
derived. Its one method returns the class identifier (CLSID) of an object that
implements one of the other persistence interfaces.
When to Implement
You must implement the IPersist interface whenever you implement any one of the other persistence interfaces: IPersistStorage, IPersistStream, or IPersistFile. Typically, embedded objects implement the IPersistStorage interface; linked objects implement the IPersistFile interface; and new moniker classes implement the IPersistStream interface.
When to Use
The IPersist interface is used primarily by the default object handler to get the class
identifier of an embedded object. Typically, container applications would not
call the IPersist interface unless they provide object handlers for specific classes of objects.
Methods in Vtable Order
IPersist Method
| Description
| GetClassID
| Returns the class identifier (CLSID) for the component object.
|
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|