Automation error

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?
 
B

Bruce W. Roeser

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top