3.1.2 ACMSDI_FORM_RECORD Structure and Macro Call
Defined in the ACMSDI.H file, the ACMSDI_FORM_RECORD type declares
form records and shadow records passed to and from presentation procedures.
The code in Example 3–1 defines the ACMSDI_FORM_RECORD type and a
macro ACMSDI_INIT_FORM_RECORD to initialize the form record structure.
Example 3–1 Form Record Definition and Initialization Macro
typedef struct {
int
data_length;
/** length of data record **/
void *data_record;
/** pointer to data record **/
int
shadow_length;
/** length of shadow record **/
void *shadow_record;
/** pointer to shadow record **/
} ACMSDI_FORM_RECORD;
#define ACMSDI_INIT_FORM_RECORD (record, data, shadow)\
{\
record.data_length = sizeof(data);\
record.data_record = &data;\
record.shadow_length = sizeof(shadow);\
record.shadow_record = &shadow;\
}\
3.1.3 Prototypes and Code for Presentation Procedures and Version
Routines
The ACMSDI.H file contains function prototypes for the presentation
procedures and action routines that your code supplies. The file PPSTUBS.C
contains stub modules you can use for linking your application (see Compaq
TP Desktop Connector for ACMS Client Application Programming Guide).
3.2 Parameter Memory Allocation
The caller of a TP Desktop Connector service or presentation procedure is
responsible for allocating the memory for the parameters of that routine.
For calls to the TP Desktop Connector client services, the desktop client
program must allocate the memory for all parameters passed in, for example,
submitter_id and call_context. For the presentation procedures, the desktop
client program can expect that TP Desktop Connector software allocates
memory for all the parameters passed in and for all workspaces before it calls
these procedures.
Portable API Presentation Procedures 3–3