OSF DCE Application Development Guide--Core Components

Topics in RPC Application Development
16.7.4 Programming Example
The following example uses the IDL encoding service features described in the
preceding sections. The example verifies that the results of a number of decoding
operations are the same as the parameters used to create the corresponding encodings.
The interface definition for this example is as follows:
[uuid(20aac780-5398-11c9-b996-08002b13d56d), version(0)]
interface es_array
{
const long N = 5000;
typedef struct
{
byte b;
long l;
} s_t;
typedef struct
{
byte b;
long a[7];
} t_t;
void in_array_op1([in] handle_t h, [in] long arr[N]);
void out_array_op1([in] handle_t h, [out] long arr[N]);
void array_op2([in] handle_t h, [in,out] s_t big[N]);
void array_op3([in] handle_t h, [in,out] t_t big[N]);
}
The attribute configuration file for the example is as follows:
interface es_array
{
[encode] in_array_op1();
[decode] out_array_op1();
[encode, decode] array_op2();
[encode, decode] array_op3();
}
124245 Tandem Computers Incorporated 16 49