Click here to Skip to main content
15,887,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am using RPC for client server communication. I am following Introduction to RPC - Part 2[^]. I have a server application running in one machine and client application is running in another machine. RpcServerListen function is running in a thread function.

I have a Shutdown function in server which contains RpcMgmtStopServerListening(NULL) and CloseHandle(hThread). I made sure that RpcServerListen function returned with no error after calling Shutdown function from server.

My problem is after calling shutdown function, if I make any call from client application, server and client both applications are abruptly closed. I checked "netstat -a" in command prompt, I could see my port is still in LISTENING state after calling Shutdown function (Port is not supposed to listen after calling RpcMgmtStopServerListening since there is no pending calls).

The port is closed only if I close server application. I tried calling RpcServerUnregisterIf function in Shutdown function but no change in result. How to resolve this issue ? I have asked the same question Introduction to RPC - Part 2[^] in the article discussion also.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900