OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
operation in the interface starts from the top of the list when looking for a server to bind
to.
The auto_handle attribute can occur at most once in the ACF.
If an interface uses the auto_handle attribute, the presence of a binding handle or
context handle parameter in an operation overrides auto_handle for that operation.
The auto_handle attribute declaration has the following syntax. (See the example at the
end of this section.)
[auto_handle] interface interface_name
You cannot use auto_handle if you use implicit_handle or if you use explicit_handle in
the interface header. You also cannot use auto_handle if you use the encode or decode
ACF attributes.
Example Using the auto_handle Attribute
ACF
[auto_handle] interface math_1
{
}
IDL File
[uuid(b3c86900-2d27-11c9-ab09-08002b0ecef1)]
interface math_1
{
/* This operation has no handle parameter,
* therefore, uses automatic binding.
*/
long add([in] long a,
[in] long b);
/*
* This operation has an explicit handle parameter, h,
* that overrides the [auto_handle] ACF attribute.
* Explicit handles also override [implicit_handle].
*/
long subtract ([in] handle_t h,
[in] long a,
[in] long b);
}
18.3.5 The explicit_handle Attribute
This attribute allows the application program to manage the binding to the server. The
explicit_handle attribute indicates that a binding handle is passed to the runtime as an
18 6 Tandem Computers Incorporated 124245