Call was rejected by callee (RPC_E_CALL_REJECTED).

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

I have written a small com-type macro that works with Solid Edge.  Occasionally it will crash with a "Call was rejected by callee" error.  Unfortunately that error never crops up when I run it in the Visual Studio environment -- only with the compiled version.  So I cannot trace back to the line that the error occurs at.  From what I can gather, it is called by Solid Edge being too busy at the time.  Is there an easy work-around to eliminate this issue?

4 REPLIES

Re: Call was rejected by callee (RPC_E_CALL_REJECTED).

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Indeed.

 

We've covered the topic extensively in the Solid Edge ST7 SDK - Handling 'Application is Busy' and 'Call was Rejected By Callee' errors

 

The SolidEdgeCommunity NuGet Package has a prebuild implementation of OleMessageFilter and we have Samples on GitHub on how to use it.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Call was rejected by callee (RPC_E_CALL_REJECTED).

Creator
Creator
I don't know if this helps, but I had .NET Macro doing that and I placed some DoIdle() through out and it worked great.

Re: Call was rejected by callee (RPC_E_CALL_REJECTED).

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

DoIdle() can help avoid rejected calls but implementing an OleMessageFilter is the only way to handle the types of exceptions mentioned in the OP. There are lots of reasons that RPC_E_CALL_REJECTED can be thrown by a COM server and it's not always in your control.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Call was rejected by callee (RPC_E_CALL_REJECTED).

PLM World Member Legend PLM World Member Legend
PLM World Member Legend
Thanks Jason. I will have a look at it.