#include <dce/dce.h> #include <dce/svcremote.h>void dce_svc_components( dce_svc_stringarray_t *table, error_status_t *status);
The dce_svc_components routine returns an array containing the names of all components in the program that have been registered with the dce_svc_register() routine.
The following code fragment shows how the dce_svc_components() routine should be used in a DCE application's implementation of the serviceability remote interface. The function defined below is the implementation of the app_svc_inq_components operation defined in the application's serviceability .epv file. Clients call this function remotely, and the function, when called, first checks the caller's authorization and then (if the client is authorized to perform the operation) calls the dce_svc_components() routine to perform the actual operation.
/*****
*
* app_svc_inq_components -- remote request for list of all components registered
* by dce_svc_register().
*
*****/
static void
app_svc_inq_components(
handle_t h,
dce_svc_stringarray_t *table,
error_status_t *st)
{
int ret;
/* Check the client's permissions here; if they are insufficient, */
/* deny the request. Otherwise, proceed with the operation... */
dce_svc_components(table, st);
}
See: dce_svc_register(3dce)
.