前言
最近一边在搞新项目,一边又在整理公司一个老Windows项目代码,结果发现有这样一个问题,跨进程调用已注册的基于ATL实现的com服务程序时会存在调用失败的情况,而不注册为服务却能正常调用,调试发现CoCreateInstance阻塞了十几秒,调用失败并返回0x80080005,以下是本人的解决方案。
解决方案
Generally this means Server (out of process server, either stand alone EXE or service) did not respond to RPCSS within definite time about COM server's successful start. Many things could have happened (may be Server got some exception/error, or server got crashed!)
But in this case, even if I start the service before making call from client, I get same response from client. Something else was wrong! And after lots of checks here and there, we found