By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,856 Members | 1,986 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,856 IT Pros & Developers. It's quick & easy.

Automation error

P: n/a
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?
--
Terry
Aug 15 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Terry" <Te****@nospam.nospamwrote in message
news:DC**********************************@microsof t.com...
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?
--
Terry

Aug 23 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.