#### Exporting the Binding Information to the Namespace

The final task of server registration (if the dce_server_c_ns_export flag is set in the dce_server_register( ) call) is to export the binding information to the namespace. In the usual case, where the server's endpoints have been dynamically allocated to it, the endpoint information will not be included in the exported handles. Instead, this information will be filled in by the host's endpoint mapper as the partially bound handles arrive at the host in incoming RPCs. However, if the endpoints are well-known, they will be included in the exported binding handles, and clients will thus import fully bound handles.

If you wish, you can use the lower level RPC routine rpc_ns_binding_export( ) to export individual services to the namespace, but in this case you should first be sure the flag dce_server_c_ns_export is not set in the dce_server_register( ) routine.

As a final note, a client must have a binding handle in order to reach a server, but it does not have to get the handle from the name service. However, the name service is the recommended way for clients and servers to find each other because it is a convenient and easy to use service built into DCE.

###