title: "endpoint is a duplicate" when starting an RPC server
body: <p>My program uses Microsoft RPC for interprocess communications. To prepare for receiving RPC calls the program runs the following sequence:</p>
  
  <ol>
  <li><p>RpcServerUseProtseqEp(), then</p></li>
  <li><p>RpcServerRegisterIf(), then</p></li>
  <li><p>RpcServerListen()</p></li>
  </ol>
  
  <p>The program starts its RPC server with the sequence above, works for some time, then terminates and may later be restarted by another program. The set of parameters values for RpcServerUseProtseqEp() is the same each time the program is run.</p>
  
  <p>When the sequence is run the first time after reboot it always succeeds, but on subsequent runs RpcServerUseProtseqEp() returns RPC_S_DUPLICATE_ENDPOINT ("The endpoint is a duplicate.") Currently I just ignore this particular error code and treat it as success, then all the other primitives usually work fine.</p>
  
  <p>What is the correct way of using RpcServerUseProtseqEp()? Should I do any cleanup to revoke the registered endpoint or just keep ignoring the RPC_S_DUPLICATE_ENDPOINT error code?</p>