Automation error

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

Hi all,
I am trying to access a .net assembly from VB6. I have created the . Net
assembly, exposed it to COM and registered it. I am able to add a reference
to it in my VB6 project. When I attempt to instanciate an object, I get
Automation error
-2147024894 (80070002)
System cannot find the file specified.

Any ideas?
 
Automation errors across the COM-Interop can sometimes be misleading. There
may be nothing wrong with your linkage - sounds to me like the .Net
component is trying to open a file (or create another object?) and tossing
an exception from its constructor. This would show up as an automation
error on the VB6 side.

Try creating the object from within the .Net project itself; is it tossing
an exception then? If so, that's your problem.

Another thing to try with COM-Interop situations is to have your object do
very little in its constructor just to make sure you're instantiating it.

HTH,

-bruce
 
Back
Top