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();
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
