OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
18.3.6 The implicit_handle Attribute
This attribute allows the application program to manage the binding to the server. You
specify the data type and name of the handle variable as part of the implicit_handle
attribute. The implicit_handle attribute informs the compiler of the name and type of the
global variable through which the binding handle is implicitly passed to the client stub.
A variable of this type and name is defined in the client stub code, and the application
initializes the variable before making a call to this interface.
The implicit_handle attribute declaration has the following syntax. (See the example at
the end of this section.)
For an interface—
[implicit_handle (handle_type handle_name)] interface interface_name
If an interface uses the implicit_handle attribute, the presence of a binding handle or in
or in,out context handle parameter in an operation overrides the implicit handle for that
operation.
The implicit_handle attribute can occur at most once in the ACF.
You cannot use the implicit_handle attribute if you are using the auto_handle attribute
or the explicit_handle attribute as an interface attribute. You also cannot use
implicit_handle if you use the encode or decode ACF attributes.
If the type in the implicit_handle clause is not handle_t, then it is treated as if it has the
handle attribute.
The ACF in the following example modifies the math_3 interface to use an implicit
handle.
Example Using the implicit_handle Attribute
ACF
[implicit_handle(user_handle_t global_handle)] interface math_3
{
/*
* Since user_handle_t is not a type defined in IDL, you
* must specify an header file that contains the definition
*/
include "user_handle_t_def";
}
IDL File
[uuid(a01d0280-2d27-11c9-9fd3-08002b0ecef1)]
interface math_3
{
long add([in] long a,
[in] long b);
}
18 8 Tandem Computers Incorporated 124245