I have a C++ unmanaged library that uses SolidEdge API.
My application is in C# and it calls LoadLibrary from the main thread (to negate multi-threading problems).
I keep getting the COM exception "Call was rejected by callee" randomly when I call SolidEdge API functions inside the library code.
I saw that there is a way to use MessageFilter to handle this error in C#.
My questions are:
1. Why is this error happening (The same code works with SolidWorks API without this problem!)?
2. If the MessageFilter is currently the only solution, is it compatible with unmanaged code? If so, how can I implement it in unmanaged C++?
I've also opened an IR to SolidEdge support (IR Number: 6130681).
Posted by: Adar ShtainhartPost date: 4/5/2009 12:52:34 AM
You can find the C++ code for the MessageFilter here:
Thanks to Martin Bernhard.
Posted by: Adar ShtainhartPost date: 4/6/2009 4:43:46 AM