Name Service Entry Cleanup

A name service entry should contain information that does not change frequently. For this reason, do not include dynamic endpoints in your exported binding handles because they will change at each invocation of the server and will clutter up your name service entry. To remove these binding handles, use RpcBindingReset.

For example, a reasonable sequence of server operations would be:

For more than one transport:

RpcServerUseProtseq();
RpcServerUseProtseq();

To place bindings in the endpoint mapper:

RpcServerInqBindings(&Vector);
RpcEpRegister(Interface, Vector);

To remove endpoints from bindings:

for (i=0; i < Vector- > Count; + + i)
{
    RpcBindingReset(Vector->BindingH[i];
}

To add bindings to the name service:

RpcNsBindingExport(RPC_C_NS_SYNTAX_DEFAULT, EntryName, Interface
                   Vector);
RpcServerListen();