OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
If you want an interface to always use explicit binding handles, the first parameter of
each operation declaration must be a binding handle, as in the following example:
void greet(
[in] handle_t h,
[in, string] char client_greeting[],
[out, string] char server_reply[REPLY_SIZE]
);
However, if you want applications to use the ACF feature of an implicit binding handle
(or even an automatic binding handle) for some or all procedures, operation declarations
must not have binding handle parameters in the interface definition:
void greet_no_handle(
[in, string] char client_greeting[],
[out, string] char server_reply[REPLY_SIZE]
);
This form of operation declaration is the most flexible because applications can always
specify explicit, implicit, or automatic binding handles through an ACF.
11.3 Running the IDL Compiler
After you have written an interface definition, run the IDL compiler to generate header
and stub files. The compiler offers many options that, for example, allow you to choose
what C compiler or C preprocessor commands are run, what directories are searched for
imported files, which of the possible output files are generated, and how the output files
are named.
The greet.idl interface definition can be compiled by the following command:
idl greet.idl
This compilation produces a header file (greet.h), a client stub file (greet_cstub.o), and
a server stub file (greet_sstub.o. For complete information on running the IDL compiler,
see the idl(1rpc) reference page.
11.4 Writing the Client Code
This section describes the client program for the greet application, whose interface
definition was shown earlier in this chapter.
The client performs the following major steps:
11 16 Tandem Computers Incorporated 124245