vb.net - COM Errors Visual Studio 2010 -
recently i've been working on external .exe communicate autocad. since outside .exe had work com wanted. (else could've used .net api (in opinion) better).
in case, keep getting com interop errors (call rejected callee) , i'm having lot of trouble dealing it. use timers on wait, or under wait particular situation. also, isn't best solution if have use slower computer.
microsoft's solution:
- add following class application.
add reference "microsoft development environment 8.0." adds references envdte , envdte80 solution.
add reference system.windows.forms.
- in code, create instance of envdte80, outlined in following example.
- call message.register handle thread errors.
- call automation code usual.
- when automation code finished, call message.revoke remove thread error handlers.
http://msdn.microsoft.com/en-us/library/vstudio/ms228772(v=vs.100).aspx
importing
in order use error management code (once class added) need add import such as:
imports windowsapplication1.consoleapplication2
Comments
Post a Comment