Obtain a list of all of the procedures registered in the Open Server.
CS_RETCODE srv_reglist(spp, proclistp)
SRV_PROC *spp; SRV_PROCLIST **proclistp;
A pointer to an internal thread control structure.
A pointer to a SRV_PROCLIST pointer that will be set to the address of a SRV_PROCLIST containing the results. The Open Server allocates the space for this structure at the time srv_reglist is called.
Returns |
To indicate |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
#include <ospublic.h>
/*
** Local Prototype.
*/
CS_RETCODE ex_srv_reglist PROTOTYPE((
SRV_PROC *spp,
SRV_PROCLIST **proclp
));
/*
** EX_SRV_REGLIST
**
** Arguments:
**
** spp Pointer to an internal thread control structure.
** proclp Pointer to a SRV_PROCLIST pointer that will be set
** to point to the result.
**
** Returns
**
** CS_SUCCEED srv_reglist was successful.
** CS_FAIL An argument was invalid or srv_reglist failed.
**
*/
CS_RETCODE ex_srv_reglist (spp, proclp)
SRV_PROC *spp;
SRV_PROCLIST **proclp;
{
/* Check arguments. */
if(spp == (SRV_PROC *)NULL)
{
return(CS_FAIL);
}
return(srv_reglist(spp,proclp));
}
srv_reglist returns a list of all currently registered procedures for the thread.
The parameter proclistp is set to point to a structure that is allocated and initialized by the Open Server. The SRV_PROCLIST structure is defined as follows:
typedef struct srv__proclist
{
CS_INT num_procs; /* The number of procedures */
CS_CHAR **proc_list; /* Array of procedure names */
} SRV_PROCLIST;
The SRV_PROCLIST structure should be deallocated with srv_reglistfree when it is no longer needed.