Automation error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?VGVycnk=?=

    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
  • Bruce W. Roeser

    #2
    Re: Automation error

    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" <TerryL@nospam. nospamwrote in message
    news:DC27B1D8-8E32-40E9-B105-6992C52166C6@mi crosoft.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

    Comment

    Working...