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 Unused:12,           // Unused
 unsigned fResponse:1,         // TRUE = DDE_REQUEST response
 unsigned fRelease:1,          // TRUE = client frees the storage
 unsigned reserved:1,          // **** Reserved ****
 unsigned fAckReq:1,           // TRUE = DDE_ACK requested
 int      cfFormat;            // Format data is rendered in
 unsigned uPSPosition;         // Start PS position
 unsigned uPSLength;           // Length of the part of the PS
 unsigned uPSRows;             // PS number of rows
 unsigned uPSCols;             // PS number of columns
 unsigned uPSOffset;           // Offset to the presentation space
 unsigned uFieldCount;         // Number of fields
 unsigned uFieldOffset;        // Offset to the field array
 unsigned char PSData[1];      // PS and Field list Array
} EPS_CF_DSPTEXT, FAR *lpEPS_CF_DSPTEXT;
 
typedef struct tagPSFIELDS
{
 unsigned char cAttribute;     // Attribute Character
 unsigned uFieldStart;         // Field start offset
 unsigned uFieldLength;        // Field Length
} PSFIELDS, FAR *lpPSFIELDS;
Note: The following examples show how to obtain long pointers to the PS and the PSFIELDS array.
  lpps = (lp_EPS_CF_DSPTEXT) lpEPS_CF_DSPTEXT->PSData
       + lpEPS_CF_DSPTEXT->uPSOffset;
  lppsfields = (lpPSFIELDS) lpEPS_CF_DSPTEXT->PSData
             + lpEPS_CF_DSPTEXT->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      Unused:12;       // **** Unused ****
 unsigned      fResponse:1;     // TRUE = DDE_REQUEST response
 unsigned      fRelease:1;      // TRUE = Client frees this data
 unsigned      reserved:1;      // **** Reserved ****
 unsigned      fAckReq:1;       // TRUE = Client returns DDE_ACK
 int           cfFormat;        // Format of the data
 unsigned char PSPOSITION[4];   // Start PS position
 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 Partial PS
 unsigned char Tab3[1];         // Tab character
 unsigned char PSCOLS[4];       // Number of columns in the PS
 unsigned char Tab4[1];         // Tab character
 unsigned char PS[1];           // PS
} EPS_CF_TEXT, FAR *lpEPS_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, FAR *lpFL_CF_TEXT;
 
typedef struct tagPS_FIELD
{
 unsigned char FieldStart[4];
 unsigned char TabF1[1];
 unsigned char FieldLength[4];
 unsigned char TabF2[1];
 unsigned char Attribute;
 unsigned char TabF3[1[;
} PS_FIELD, FAR *lpPS_FIELD;
Note: The following examples show how to obtain long pointers to the PS and the PS_FIELD array.
  lpps = lpEPS_CF_TEXT->PS;
  lpps_field = (lpPS_FIELD) lpEPS_CF_TEXT->PS
             + atoi(lpEPS_CF_TEXT->PSLENGTH)
             + ((atoi(lpEPS_CF_TEXT->PSROWS) - 1) * 2) // CR/LF
             + 1 + 1 + 4 + 1;   // Tabs + size of field count