OSF DCE Application Development Guide--Introduction and Style Guide
A Sample Application
unsigned_char_t *entry_name = NULL; /* Object entry name from */
/* bind_to_object(). */
unsigned_char_t *object_name = NULL; /* Residual object name from */
/* bind_to_object(). */
/* Process the command line... */
do_client_command_line(argc, argv, &kill_server, &objectname_vector);
/* Start importing servers. Note that the contents of the environ- */
/* ment variable RPC_DEFAULT_ENTRY are used to determine the entry */
/* to import from... */
fprintf(stdout,
"sample_client: Calling rpc_ns_binding_import_begin()...0);
rpc_ns_binding_import_begin(
rpc_c_ns_syntax_default,
NULL, /* Use the RPC_DEFAULT_ENTRY. */
sample_v1_0_c_ifspec,
NULL,
&import_context,
&status);
if (status != rpc_s_ok)
{
print_error("rpc_ns_binding_import_begin()", status);
exit(1);
}
/* Import the first server (we could iterate here, but we’ll just */
/* take the first one)... */
fprintf(stdout,
"sample_client: Calling rpc_ns_binding_import_next()...0);
rpc_ns_binding_import_next(import_context, &binding_h, &status);
if (status != rpc_s_ok)
{
print_error("rpc_ns_binding_import_next()", status);
exit(1);
}
/* Free the import context... */
fprintf(stdout,
"sample_client: Calling rpc_ns_binding_import_done()...0);
rpc_ns_binding_import_done(&import_context, &status);
if (status != rpc_s_ok)
{
print_error("rpc_ns_binding_import_done()", status);
exit(1);
}
124246 Tandem Computers Incorporated A− 81