OSF DCE Application Development Guide--Introduction and Style Guide
OSF DCE Application Development Guide—Introduction and Style Guide
{
dce_error_string_t error_string;
int print_status;
*st = error_status_ok;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_binder, svc_c_debug6,
"Entering name_to_object()..."));
if (!component || !*component)
{
dce_svc_printf(CANNOT_RESOLVE_NAME_MSG);
return;
}
/* dce_db_fetch_by_name() retrieves data from the string-indexed */
/* backing store identified by the handle parameter, which was */
/* obtained from dce_db_open(). It is a specialized retrieval */
/* routine for backing stores that are indexed by string, as sel- */
/* ected by the db_c_index_by_name bit in the flags parameter to */
/* dce_db_open() when the backing store was created. */
/* Here it’s the object_uuid that is to be returned... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_binder, svc_c_debug6,
"Calling dce_db_fetch_by_name()..."));
dce_db_fetch_by_name(
db_name, /* Name-indexed database, globally-known handle. */
(char *)component, /* Pointer to the key we’re using, i.e. */
/* the name. */
object_uuid, /* What we’re hoping to get, i.e. object UUID. */
st);
if (*st != error_status_ok)
{
dce_error_inq_text(*st, error_string, &print_status);
dce_svc_printf(BINDER_ERROR_MSG, "dce_db_fetch_by_name()",
error_string);
return;
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_binder, svc_c_debug6,
"Successfully exiting name_to_object()"));
}
/* The bind interface’s routines’ entry point vector. Here the actual ad- */
/* dresses are filled in... */
sample_bind_v1_0_epv_t sample_bind_epv = {
name_to_object
};
A− 72 Tandem Computers Incorporated 124246