Section 8 Application Interface
Rev. 1.01 Mar. 17, 2008 Page 96 of 128
REJ10J1822-0101
8.3 Server-Initialization Function
The server-initialization function is called by the server application and starts up the server by
using rpc_start_server() or rpc_start_server_with_paramarea().
When SVR_NOINIT has not been specified, RPCGEN generates a server-initialization function
rpcsvr_<server name>_init. RPCGEN outputs the server-initialization function itself to <config
file>_svr.c and the prototype declaration to <config file>_svr.h.
<Server name> refers to the server name defined with SVR_NAME.
When SVR_NOINIT has been specified, RPCGEN does not generate a server-initialization
function. The server-initialization function must be provided by the user if one is required.
The specification of the server-initialization function generated by RPCGEN is as follows.
• C-language API
INT32 rpcsvr_<server name>_init( rpc_svr_config *__config);
• Return value
The return value of rpc_start_server() or rpc_start_server_with_paramarea()
• Parameter: __config
The definition of an rpc_svr_config structure is given below. Each of the members has the
same meaning as that of the rpc_server_info structure.
typedef struct {
UINT32 ulRPCServerID;
UINT32 ulRPCServerVersion;
UINT32 ServerStubTaskPriority;
UINT32 ulStubStackSize;
UINT32 ulMaxParamAreaSize;
void *pUserDefinedData;
} rpc_svr_config;