OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
• If the parameter name is different from any name defined within the operation
definition in the IDL file, the IDL compiler creates an extra output parameter of type
error_status_t in the application code after the last parameter defined in the IDL
file. In a successfully completed remote call, this extra parameter has the value
error_status_ok.
In either case, if an error occurs during the remote call, the error code is returned to the
parameter that has the status attribute. (See the for an explanation of status codes.)
If you define both additional comm_status and additional fault_status parameters, they
are automatically added at the end of the procedure declaration in the order of
specification in the ACF.
In the following example, there are three possible uses of the status attributes: as the
operation result of add , as a parameter of subtract as defined in the IDL file, and as an
additional parameter of multiply.
Example Using the comm_status and fault_status Attributes
ACF
[auto_handle] interface math_4
{
[comm_status,fault_status] add();
subtract ([comm_status,fault_status] s);
/*
* ’sts’ is not a parameter in the interface definition of
* operation ’multiply’. This specifies that the application
* wants a trailing parameter ’sts’ that is of type
* error_status_t, after the parameters a and b.
*/
multiply ([comm_status] c_sts,[fault_status] f_sts);
}
IDL File
[uuid(91365000-2d28-11c9-ad5a-08002b0ecef1)]
interface math_4
{
error_status_t add ([in] double a,
[in] double b,
[out] double *c);
double subtract ([in] double a,
[in] double b,
[out] error_status_t *s);
double multiply ([in] double a,
[in] double b);
}
server.c
18 − 10 Tandem Computers Incorporated 124245