470,619 Members | 1,483 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

Automation error

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
1 2269
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.

Similar topics

3 posts views Thread by Robert | last post: by
2 posts views Thread by Andante.in.Blue | last post: by
25 posts views Thread by Neil Ginsberg | last post: by
12 posts views Thread by Cheval | last post: by
1 post views Thread by Jimmer | last post: by
12 posts views Thread by elziko | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.