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:

  1. add following class application.
  2. add reference "microsoft development environment 8.0." adds references envdte , envdte80 solution.

    add reference system.windows.forms.

  3. in code, create instance of envdte80, outlined in following example.
  4. call message.register handle thread errors.
  5. call automation code usual.
  6. 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

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -