Registering Multiple Implementations of an Interface

You can supply more than one implementation of the remote procedure(s) specified in the IDL file. The server application calls RpcObjectSetType to map object UUIDs to type UUIDs and calls RpcServerRegisterIfEx or RpcServerRegisterIf to associate manager EPVs with a type UUID. When a remote procedure call arrives with its object UUID, the RPC server run-time library maps the object UUID to a type UUID. The server application then uses the type UUID and the interface UUID to select the manager EPV.

You can also specify your own function to resolve the mapping from object UUID to manager type UUID. You specify the mapping function when you call RpcObjectSetInqFn.

To offer multiple implementations of an interface, a server must register each implementation by calling the RpcServerRegisterIf* routine separately. For each implementation a server registers, it supplies the same IfSpec argument, but a different pair of MgrTypeUuid and MgrEpv arguments.

In the case of multiple managers, use the RpcServerRegisterIf* routine as follows: