OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
17.12 Parameter Declarations
A parameter_declaration is used in an operation declaration to declare a parameter of
the operation. A parameter_declaration takes the following form:
[parameter_attribute, ...] type_specifier parameter_declarator
If an interface does not use implicit handles or use interface-based binding, the first
parameter must be an explicit handle that gives the object UUID and location. The
handle parameter can be of a primitive handle type, handle_t, or a nonprimitive user-
defined handle type.
A parameter_attribute can be any of the following:
array_attribute: One of several attributes that specifies the characteristics of arrays.
in: The parameter is an input attribute.
out: The parameter is an output attribute.
ref: The parameter is a reference pointer; it cannot be NULL and cannot be an
aliased pointer.
ptr: The parameter is a full pointer; it can be NULL and can be an aliased pointer.
unique: The parameter is a unique pointer; it can be NULL.
string: The parameter is a string.
context_handle: The parameter is a context handle.
switch_is:
The directional attributes in and out specify the directions in which a parameter is to be
passed. The in attribute specifies that the parameter is passed from the caller to the
callee. The out attribute specifies that the parameter is passed from the callee to the
caller.
An output parameter must be passed by reference and therefore must be declared with an
explicit * (asterisk). (Note that an array is implicitly passed by reference and so an
output array does not require an explicit *.) At least one directional attribute must be
specified for each parameter of an operation.
An explicit handle parameter must have at least the in attribute.
The ref, unique, and ptr attributes are described later in Section 17.14.7. The string
attribute is described in Section 17.14.6. The context_handle attribute is described in
Section 17.14.9.1.
The type_specifier in a parameter declaration specifies the data type of the parameter.
The declarator in a parameter declaration can be any simple or complex declarator.
A parameter with the out attribute must be either an array or an explicitly declared
pointer. An explicitly declared pointer is declared by a pointer_declarator, rather than
by a simple_declarator with a named pointer type as its type_specifier.
17 20 Tandem Computers Incorporated 124245