Hi,

I have implemented some RPC mechanism in one of my applications. It has a server and client both running on the same machine. I'm using local RPC (ncalrpc). Now, when I call a method via RPC, i want to have some kind of way to timeout the call in case the server is not responding or is slow at responding. There is a function called RpcBindingSetOption which can be used to specify a timeout, but it only works with XP and not with local RPC.
I was thinking of putting the RPC method call in its own thread and simply terminate the thread from another thread when timeout elapses, but using TerminateThread is dangerous according to MSDN.

Does anyone has any nice solution to my problem?