Structure of the Presentation Space
Personal Communications returns the part of the presentation space in the format specified in the Get Partial Presentation Space request.
If the format is CF_DSPTEXT, Personal Communications returns the presentation space
in the following format:
typedef struct tagEPS_CF_DSPTEXT
{
unsigned char data[(sizeof(DDEDATA)-1)];
unsigned short uPSPosition; /* Position of the part of PS
unsigned short uPSLength; /* Length of the part of the PS
unsigned short uPSRows; /* PS number of rows
unsigned short uPSCols; /* PS number of columns
unsigned short uPSOffset; /* Offset to the presentation space
unsigned short uFieldCount; /* Number of fields
unsigned short uFieldOffset; /* Offset to the field array
unsigned char PSData[1]; /* PS + Field list Array(lpPSFIELDS)
} EPS_CF_DSPTEXT;
typedef union tagDDE_EPS_CF_DSPTEXT
{
DDEDATA DDEdata;
EPS_CF_DSPTEXT DDEeps;
} DDE_EPS_CF_DSPTEXT, *lpDDE_EPS_CF_DSPTEXT;
# The PSFIELDS structure is replaced with below structure.
typedef struct tagPSFIELDS
{
unsigned short uFieldStart; /* Field start offset
unsigned short uFieldLength; /* Field Length
unsigned char cAttribute; /* Attribute character
unsigned char ubReserved; /* *** Reserved ***
} PSFIELDS, *lpPSFIELDS;
Note: The following examples
show how to obtain long pointers to the PS and the PSFIELDS array.
lpDDE = (lpDDE_EPS_CF_DSPTEXT)GlobalLock(hData);
lpps = lpDDE->DDEeps.PSData + lpDDE->DDEeps.uPSOffset;
lppsfields = lpDDE->DDEeps.PSData + lpDDE->DDEeps.uFieldOffset;
If the format is CF_TEXT, Personal Communications returns the part of the presentation
space in the following format:
typedef struct tagEPS_CF_TEXT
{
unsigned char data[(sizeof(DDEDATA)-1)];
unsigned char PSPOSITION[4];/* Position of part of the PS
unsigned char Tab1[1]; /* Tab character
unsigned char PSLENGTH[4]; /* Length of the part of the PS
unsigned char Tab2[1]; /* Tab character
unsigned char PSROWS[4]; /* Number of rows in the PS
unsigned char Tab3[1]; /* Tab character
unsigned char PSCOLS[4]; /* Number of Cols in the PS
unsigned char Tab4[1]; /* Tab character
unsigned char PS[1]; /* PS
} EPS_CF_TEXT;
typedef union tagDDE_EPS_CF_TEXT
{
DDEDATA DDEdata;
EPS_CF_TEXT DDEeps;
} DDE_EPS_CF_TEXT, *lpDDE_EPS_CF_TEXT;
Following the PS in the buffer is the following additional structure
of fields that compose the field list.
typedef struct tagFL_CF_TEXT
{
unsigned char Tab5[1]; /* Tab character
unsigned char PSFldCount[4]; /* Number of fields in the PS
unsigned char Tab6[1]; /* Tab character
PS_FIELD Field[1]; /* Field List Array
} FL_CF_TEXT, *lpFL_CF_TEXT;
typedef struct tagPS_FIELD
{
unsigned char FieldStart[4];
unsigned char TabF1[1];
unsigned char FieldLength[4];
unsigned char TabF2[1];
Note: The following examples
show how to obtain long pointers to the PS and the PS_FIELD array.
lpDDE = (lpDDE_EPS_CF_TEXT)GlobalLock(hData);
lpps = lpDDE->DDEeps.PS;
lpps_field = lpDDE->DDEeps.PS
+ atoi(lpDDE->DDEeps.PSLENGTH)
+ ((atoi(lpDDE->DDEeps.PSROWS) -1) * 2) // CR/LF
+ 1 + 1 + 4 + 1; // Tabs + size of field count