PPrivateData

Associates private data with the specified graphic, image, page, master page, story, text block, or publication, by passing a handle to the buffer containing the data.


Command constructor

PPrivateData(const char * sDeveloperID, const char * sPlugInID, short CTargetClass, unsigned long nTypeFlag, unsigned long nTargetID, PMBool bChange, Handle hPrivateData, size_t nSize);
const char * sDeveloperID;
Four-character string representing your name or your company name (e.g., "ADBE" for Adobe)
const char * sPlugInID;
Four-character string representing plug-in (e.g., "KYLN"for the Keyline plug-in)
short cTargetClass;
kClassObject for imported graphics and images, as well as PageMaker lines, boxes, ovals, polygons, or text blocks
kClassStory for stories
kClassPub for publication (current publication only)
kClassPage for page
kClassMaster for master page
unsigned long nTypeFlag;
Identifier you define to distinguish between types of private data for same cTargetClass (but -1 and -2 are not allowed). If you don't need to classify your private data, use 0.
unsigned long nTargetID;
Internal PageMaker identifier for element (graphic, image, page, master page, text block, or story) to which the private data is associated
0 (zero) for publication (PageMaker associates private data with the current publication only)
PMBool bChange;
true to overwrite existing private data from same plug-in
false to return error (and leave private data unchanged) if target already has private data from same plug-in
Handle hPrivateData;
Handle to buffer that contains the private data you want to store with the specified element
size_t nSize;
Size of buffer
sDeveloperID. To ensure that no one else uses your four-character developer ID, you should register it with the Adobe Plug-ins Support Engineer.

Free memory. The plug-in must both allocate and free a block of global memory for the private data. (Use MMAlloc and MMFree, the cross-platform, memory-management routines described in chapter 4.)

Five parameters needed to identify data. PageMaker requires five parameters to identify private data:

nTypeFlag. You define the value of nTypeFlag. This identifier lets you distinguish between different types of private data associated with a class of objects (graphics, page, master page, story, or publication). Never set this ID to -1 or -2.

bChange. If the target already has private data from the same plug-in and with the same private ID, and bChange is:

Exceptions. PPrivateData throws an exception if:


See also

The PDeletePrivateData and PPrivateString commands

The PGetPrivateData, PGetPrivateList, and PGetPrivateString queries


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support