OSF DCE Application Development Guide--Introduction and Style Guide

A Sample Application
/* to the caller; we have no further use for it here... */
fprintf(stdout, "sample_client: Imported partial binding.0);
fprintf(stdout, "sample_client: Calling rpc_ns_binding_inq_entry_name()...0);
rpc_ns_binding_inq_entry_name(
(rpc_binding_handle_t)*binding_h,
rpc_c_ns_syntax_default,
entry_name,
status);
if (*status != error_status_ok)
{
print_error("rpc_ns_binding_inq_entry_name()", *status);
return;
}
/* Note that at this point, we can only assume that the server */
/* has put at least one object UUID in the endpoint map and */
/* the name space. If id_hint was null, we got one of the object */
/* UUIDs from the namespace at random. If id_hint was supplied, */
/* we either got that UUID or failed. If no UUIDs were exported, */
/* then the binding contains none, so when we make the call */
/* we are only guaranteed to get to some server that supports */
/* the sample_bind interface on the bound-to host. It may */
/* well be the wrong one, in which case we will now fail... */
/* This is the "remote binding interface" call. What we are hoping */
/* to get from it is the object UUID of the object whose name is */
/* pretending (via a junction) to be in the namespace. These */
/* things, not being in the namespace, are held in a backing store */
/* database maintained by the server... */
fprintf(stdout, "sample_client: Calling [remote] rs_bind_to_object()...0);
rs_bind_to_object(
*binding_h, /* The partial binding we just got. */
*residual, /* The backing store "key", i.e. object name. */
object_uuid, /* To return the object UUID. */
mgr_type_uuid, /* To return the type manager UUID. */
status);
if (*status != error_status_ok)
{
print_error("rs_bind_to_object()", *status);
return;
}
124246 Tandem Computers Incorporated A 95