Microsoft Windows CE 3.0  

IPersist:IUnknown

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This interface defines the single method GetClassID, which is designed to supply the class identifier (CLSID) of an object that can be stored persistently in the system. A call to this method can allow the object to specify which object handler to use in the client process, as it is used in the OLE default implementation of marshaling.

The IPersistinterface defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. A call to this method can allow the object to specify which object handler to use in the client process, as it is used in the OLE default implementation of marshaling.

IPersistis the base interface for another interface, IPersistStorage. This interface, therefore, includes the GetClassIDmethod, and is implemented on objects that can be serialized to a storage. The methods of this interface allow the state of the object to be saved for later instantiations, and load the object using the saved state. Typically, the persistence interfaces are implemented by an embedded or linked object, and are called by the container application or the default object handler

When to Implement

You must implement the single method of IPersistin implementing the other persistence interface, IPersistStorage. Typically, for example, you would implement IPersistStorageon an embedded object, although its uses are not limited to this object. You could implement IPersistin a situation where all that is required is to obtain the CLSID of a persistent object, as it is used in marshaling.

When to Use

The single method of IPersistis rarely called directly in application code. It is called by the default object handler to get the CLSID of an embedded object, or an object to be marshaled. A container application, for example, would probably not call the GetClassIDmethod directly unless it provided object handlers for specific classes of objects.

Method Description
IPersist::GetClassID Retrieves the class identifier (CLSID) of an object. The CLSID is a unique value that identifies the code that can manipulate the persistent data.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 2.0 and later Oleidl.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

IPersistStorage, IPersist::GetClassID