OSF DCE Application Development Guide--Core Components
Attribute Configuration Language
Example Using the represent_as Attribute
ACF
[auto_handle] interface phonedir
{
/*
* You must specify an included file that contains the
* definition of my_dir_t.
*/
include "user_types";
/*
* The application code wants to pass data type my_dir_t
* rather than dir_t. The [represent_as] clause allows
* this, and you must supply routines to convert dir_t
* to/from my_dir_t.
*/
typedef [represent_as(my_dir_t)] dir_t;
}
IDL File
[uuid(06a12100-2d26-11c9-aa24-08002b0ecef1)]
interface phonedir
{
typedef struct
{
short int area_code;
long int phone_num;
char last_name[20];
char first_name[15];
char city[20];
} dir_t;
void add ([in] dir_t *info);
void lookup ([in] char city[20],
[in] char last_name[20],
[in] char first_name[15],
[out] dir_t *info);
void delete ([in] dir_t *info);
}
18.3.10 The enable_allocate Attribute
The enable_allocate attribute on an operation causes the server stub to initialize the
rpc_ss_allocate() routine. The rpc_ss_allocate() routine requires initialization of its
environment before it can be called. The server stub automatically initializes (enables)
rpc_ss_allocate() if the operation uses either full pointers or a type with the
124245 Tandem Computers Incorporated 18− 15