开发者

COM component crash

When you have a piece of software that runs an out of process COM server and the COM server crashes, will it show a message (let's say its an unhandled exception) to the user or what will happen?

Also, will the COM client crash too, knowing that this client relies on this COM Server quite a lot?

What's the behaviour in regards COM Server and COM client when a开发者_运维知识库n unhandled exception occurs in the server?


The COM client will get RPC_E_SERVERFAULT as the HRESULT from the next COM call and all others until the server is restarted. This will not necessarily result in a crash, as long as the client checks its error codes. However, this is probably not a recoverable error for the client, so upon getting RPC_E_SERVERFAULT (or, really, any RPC_E error code), you should probably initiate a graceful exit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜