PreviousNext

dce_svc_register(3dce)

Registers a serviceability message table

Synopsis

#include <dce/dce.h>

dce_svc_handle_t dce_svc_register(

dce_svc_subcomp_t *table,
const idl_char *component_name,
error_status_t *status);

Parameters

Input

table
A message table structure (defined in a header file generated by sams during compilation).

component_name
The serviceability name of the component, defined in the component field of the sams file.

Output

status
Returns the status code from this operation. The status code is a value that indicates whether the routine completed successfully and if not, why not.

Description
The dce_svc_register( ) routine registers a serviceability message table. An application must call either it (or the DCE_SVC_DEFINE_HANDLE( ) macro) in order to set up its table(s) and obtain the serviceability handle it must have in order to use the serviceability interface.

Two parameters are required for the call: table is a pointer to the application's serviceability table, defined in a file called dceappsvc.h generated by the sams utility. component_name is a string whose value is app, which is defined in the component field of the sams file in which the serviceability messages are defined.

On error, this routine returns NULL and fills in status with an error code.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

The following serviceability status codes are defined:

svc_s_assertion_failed
A programmer-developed compile-time assertion failed.

svc_s_at_end
No more data is available.

svc_s_bad_routespec
See svcroute(5dce) for information on routing specification format.

svc_s_cantopen
Permission denied or file does not exist; consult errno.

svc_s_no_filter
Attempted to send data to the filter-control handle for a component that does not have a filter registered.

svc_s_no_memory
Could not allocate memory for message table, string copy or other internal requirement.

svc_s_no_stats
The definition of the return value has not been specified.

svc_s_ok
Operation performed.

svc_s_unknown_component
Could not find the service handle for a component.

Related Information
Functions: dce_svc_debug_routing(3dce)

dce_svc_debug_set_levels(3dce)

dce_svc_define_filter(3dce)

dce_svc_routing(3dce)

dce_svc_unregister(3dce)