Perserve: IPersistStream Persistent Object Server

Click to open or copy the Perserve project files.

Click to open or copy the Include files (required).

Click to open or copy the Library files (required).

Note   To use this sample, you must first build the Register sample.

The Perserve sample introduces the COPageList COM object, which encapsulates a page list. The list contains elements that correspond to pages of text or drawing data. COPageList objects expose a set of interfaces that make the objects connectable, persistent managers of the list data. Client access to this data is available through an IPageList custom interface. COPageList implements the IPageList interface.

A clear architectural distinction is kept between client and server. COPageList provides no graphical user interface (GUI). Instead, the COPageList object relies on the client for all GUI behavior.

The Perclien client provides the GUI display and manages the list of pages, the content of which are stored in a compound file that contains both the contents of the list and of each page in that list. The user of Perclien can edit the content of two type of pages: text pages and drawing pages. Text pages have text data that the user can edit using a simple windowed text editor. Drawing pages have drawing data that the user can edit using free-form, scribble-like functionality based on the Stoserve and Stoclien samples. Both types of editing are done in separate client windows. The details of the client are covered in the Perclien sample.

See the parent topic, COM Tutorial Samples, to download global tutorial files or any HTML files about this sample.

Building SDK Samples

This sample uses the following keywords:

_ltoa; _ltow; addref; addregnamedvalue; advise; ansitouc; canunloadnow; cfpagelist; cimpiclassfactory; cimpiconnectionpointcontainer; cimpipagelist; cimpipersiststream; clear; cleared; clone; coconnectionpoint; coenumconnectionpoints; coenumconnections; copagelist; createinstance; cserver; defined; delete; delete_pointer; dllcanunloadnow; dllgetclassobject; dllmain; dllregisterserver; dllunregisterserver; enumconnectionpoints; enumconnections; failed; findconnectionpoint; findslot; get; getclassid; getconnectioninterface; getconnectionpointcontainer; getlasterror; getmodulefilename; getsizemax; getslot; getusername; interlockeddecrement; interlockedincrement; isdirty; load; loaded; lock; lockserver; lstrcat; lstrcpy; lstrlen; makelong; memcpy; memset; next; nextname; nextslot; notifysinks; objectsdown; objectsup; ownthis; pageadded; pagedeleted; pageset; queryinterface; regclosekey; regcreatekeyex; regdeletekey; regopenkeyex; regsetvalueex; release; release_interface; reset; save; saved; set; setregkeyvalue; skip; stdentry_; stdmethodimp_; stringfromguid2; succeeded; text; uliset32; unadvise; unicodeok; unlock; unownthis; wsprintf