OSF DCE Application Development Guide--Introduction and Style Guide
A Sample Application
/* Object name only, try default search path... [original note] */
/* (Apparently the assumption is that if we gave an incomplete */
/* name, that must mean that we were passed only a simple object */
/* name, which means that we must try to reconstruct the path to */
/* the "junction"... */
if (*status == rpc_s_incomplete_name)
{
fprintf(stdout,
"sample_client: Object name only given, trying default search path...0);
/* Make the object name the "residual"... */
*residual = (unsigned_char_t *)malloc(strlen((char *)object_name));
strcpy((char *)*residual, (char *)object_name);
/* Try importing from the RPC_DEFAULT_ENTRY, with interface */
/* and object UUID specified, if any were given to us */
/* (which they weren’t in the original call made from */
/* main())... */
fprintf(stdout, "sample_client: Calling rpc_ns_binding_import_begin()...0);
rpc_ns_binding_import_begin(
rpc_c_ns_syntax_default,
NULL,
if_hint,
id_hint,
&import_context,
status);
/* If that didn’t succeed, we’re at a loss... */
if (*status != rpc_s_ok)
{
print_error("rpc_ns_binding_import_begin()", *status);
return;
}
fprintf(stdout, "sample_client: Found object.0);
}
/* We either resolved the name completely, or we resolved every- */
/* thing but the simple object name part. But if the latter is */
/* the case, that’s the same thing for us as having a full entry */
/* name to import from, since the whole point of this exercise is */
/* that the object part of the name isn’t in the namespace in the */
/* the first place. So... */
124246 Tandem Computers Incorporated A− 93










