PreviousNext

Unregistering the Server

Two important aspects of registering the server is that it registered the interfaces and EPVs with the RPC runtime, and it established the endpoints (or addresses) on which the server listened for requests. If the endpoint map contains stale data, it can create for a client a fully bound binding that is not valid. Even though the endpoint mapper service does its own housecleaning periodically, there is the possibility that these invalid bindings could be created and used. Therefore, it is a good idea to call the following routine:

dce_server_unregister(server_handle, &status);

In addition to unregistering the server's address information from the local endpoint mapper's database, this routine unregisters all the services (interfaces and EPVs) from the RPC runtime as well.

If your application requires a partial shutdown or a particular order to the shutdown of services, you can use more specific routines such as rpc_ep_unregister( ) and dce_server_disable_service( ).