PreviousNext

Basic Steps in Setting Up the Remote Interface

To make the interface available, the developer must do the following:

1. Coding steps

· Define the server implementation routines for the remote operations.

· Initialize the serviceability interface manager entry point vector (manager EPV) with the implementation routines.

2. Build steps

· Process the service.idl file to produce the following:

- Client stub

This will be linked into the client object. The client itself can contain calls to the remote routines, expressed by their interface names.

- Server stub

This will be linked into the server object (just as its "own" stub(s) are) to produce the server executable. Note that the server stub is generated with the -no_mepv IDL option, which allows the implementation routines to be named anything that suits the developer. This is why the EPV must be explicitly initialized with the implementation routines' addresses.

3. Runtime steps

· At server startup:

The binding handles that the server receives from the RPC runtime, and which it then registers both with the Name Server Interface (NSI) and the endpoint mapper under its "own" interface, must also be registered to the endpoint mapper with the serviceability interface. Note that servers do not explicitly register the serviceability interface with the NSI. Instead, they use their existing namespace entries without change. They do register the serviceability interface with their endpoint mapper.

· For a client application:

To call one of a server's remote serviceability routines, the client must import a binding handle using a NULL UUID; this operation will yield a "plain" handle. The client can then pass this handle to the desired remote serviceability routine and make the call. The server's host endpoint mapper will recognize the incoming serviceability UUID in the RPC, and will send the RPC on to one of the registered endpoints.

The following code fragments illustrate how to define, export, and access the serviceability remote interface. See Implementing the Remote Routines, Registering and Exporting the Remote Interface, and Importing and Accessing the Remote Interface.