Windows NT RPC Service / Name Service Database
Posted on 1999-07-19
I have a windows nt service that uses rpc. I have been having some problems with being able to reliably obtain a binding between client and server.
When the server is installed it does the following:
// Clear the endpoints out of the binding handles
// This forces the clients through the endpoint mapper and
// reduces the volatility of the namespace entry for this service.
for(UINT i = 0; i < m_pBindingVector->Count; ++i)
According to msdn I should not keep exporting to NS each time I run...I know this info. seems to contradict all the examples they provide!...
So when I Start the service:
When I stop:
This code means that I don't get stale entries in the NS as I used to when I followed earlier examples which used to export each time the service started...but I still find I have problems getting bindings sometimes, and the resolution is to uninstall and then reinstall the service, presumably reinstalling the ns entry for the service...but how does the ns entry get lost? What is the best way to check on startup?