RPC, Service & dll : RPC_S_DUPLICATE_ENDPOINT (1740)
Here are my problems
I have developped a service that is accessible via RPC.
This service is called by another program via a dll.
1. When the service is started, we can see that it uses 5 threads (in the task manager window). When it is called by the dll and it is running, it uses 7 threads. Once the call is finished and the Binding has been released, it uses 6 threads and not 5 as it did before having run once. Why is that?
2. When we stop the service and try to restart it, we sometimes get the message RPC_S_DUPLICATE_ENDPOINT (1740) which means "The endpoint is a duplicate" and the service does not start correctly but stays pending in a "starting" state. The only way to restart the service afterwards is to restart the computer, which is really annoying. What does it really mean ? Does it mean that when the service stopped, it was still in use, called by my dll ? This latter problem does not occur everytime we restart the service but only from time to time, and the problem only occurs on Windows 2000 and not on Windows NT.