PreviousNext

rpc_server_register_if(3rpc)

Registers an interface with the RPC runtime; used by server applications

Synopsis

#include <dce/rpc.h>

void rpc_server_register_if(

rpc_if_handle_t if_handle,

uuid_t *mgr_type_uuid,

rpc_mgr_epv_t mgr_epv,

unsigned32 *status);

Parameters

Input

if_handle
An IDL-generated data structure specifying the interface to register.

mgr_type_uuid
Specifies a type UUID to associate with the mgr_epv parameter. Specifying the value NULL (or a nil UUID) registers the if_handle with a nil type UUID.

mgr_epv
Specifies the manager routines' entry point vector. To use the IDL-generated default entry point vector, specify NULL.

Output

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The rpc_server_register_if( ) routine registers a server interface with the RPC runtime. A server can register an unlimited number of interfaces. Once registered, an interface is available to clients through any binding handle of the server, provided that the binding handle is compatible for the client.

A server must provide the following information to register an interface:

· An interface specification, which is a data structure generated by the IDL compiler. The server specifies the interface specification of the interface using the if_handle parameter.

· A type UUID and manager Entry Point Vector (EPV), a data pair that determines which manager routine executes when a server receives a remote procedure call request from a client.

The server specifies the type UUID and EPV using the mgr_type_uuid and mgr_epv parameters, respectively. Note that when a non-nil type UUID is specified, the server must also call the rpc_object_set_type( ) routine to register objects of this non-nil type.

A server that only offers a single manager for an interface calls rpc_server_register_if( ) once for that interface. In the simple case where the single manager's entry point names are the same as the operation names in the IDL interface definition, the IDL-generated default manager EPV for the interface may be used. The value NULL in mgr_epv specifies the default manager EPV.

Note that if a server offers multiple implementations of an interface, the server code must register a separate manager entry point vector for each interface implementation.

More:

Rules for Invoking Manager Routines