OSF DCE Application Development Guide--Core Components
Attribute Configuration Language
/*
* The three server procedures below illustrate the different
* models of comm_status and fault_status appearing in the
* idl and acf declarations above.
*
* RPC automatically passes back DCE error codes through
* comm_status and fault_status. These examples differ in
* their handling of the nonerror case.
*/
error_status_t add (double a,
double b,
double * c)
{
...
*c = answer;
/*
* comm_status and fault_status are operation attributes.
* If no error occurs, the client will see the value that
* the server returns.
*
* We return error_status_ok here for the normal
* successful case.
*/
return error_status_ok;
}
double subtract (double a,
double b,
error_status_t * s)
{
/*
* "s" appears in both the idl definition and the acf
* specification.
*
* In the successful case, the client is returned the
* value that the server puts in *s. Therefore, assume
* success here.
*/
*s = error_status_ok;
...
return answer;
}
124245 Tandem Computers Incorporated 18− 11