Click to open or copy the Pertext 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.
Pertext is the second sample in a group of samples that covers various techniques for implementing COM object persistence. The first sample, Perserve, covers persistence by implementing the IPersistStream standard interface. This sample, Pertext, covers persistence by implementing the IPersistStreamInit standard interface. The third sample, Perdraw, covers persistence by implementing the IPersistStorage standard interface. The fourth sample, Perclien, covers how a client exploits the kinds of persistence provided the Perserve, Pertext, and Perdraw server components.
The Pertext sample introduces the COTextPage COM object, which encapsulates the data of an editable page of text. COTextPage objects expose a set of interfaces whose methods make the objects connectable, persistent managers of text data. Client access to this data is available through an ITextPage custom interface. COTextPage implements the ITextPage interface.
See the parent topic, COM Tutorial Samples, to download global tutorial files or any HTML files about this sample.
This sample uses the following keywords:
addref; addregnamedvalue; advise; canunloadnow; cftextpage; cimpiclassfactory; cimpiconnectionpointcontainer; cimpipersiststreaminit; cimpitextpage; clear; cleared; clone; coconnectionpoint; coenumconnectionpoints; coenumconnections; cotextpage; createinstance; cserver; defined; delete_pointer; dllcanunloadnow; dllgetclassobject; dllmain; dllregisterserver; dllunregisterserver; enumconnectionpoints; enumconnections; failed; findconnectionpoint; findslot; getclassid; getconnectioninterface; getconnectionpointcontainer; getlasterror; getlength; getmodulefilename; getsizemax; getslot; gettext; getusername; initnew; interlockeddecrement; interlockedincrement; isdirty; load; loaded; lock; lockserver; lstrcat; lstrcpy; lstrlen; makelong; memcpy; memset; next; notifysinks; objectsdown; objectsup; ownthis; put; puttext; queryinterface; regclosekey; regcreatekeyex; regdeletekey; regopenkeyex; regsetvalueex; release; release_interface; reset; save; saved; setregkeyvalue; skip; stdentry_; stdmethodimp_; stringfromguid2; succeeded; text; uliset32; unadvise; unicodeok; unlock; unownthis; wsprintf