COM Interop [2.0]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon

    #1

    COM Interop [2.0]

    I have created a class library in v 2.0. I have set the COM Visible
    attribute to True. Register for COM Interop is also checked in the IDE.

    I need to use the DLL from a VB6 application, so on the dev machine with VB
    6, I ran regasm /codebase. I was then able to add a reference to the DLL and
    code against it. It runs fine and uses the .Net DLL perfectly.

    Now, I am trying to get the compiled VB 6 application to work with the DLL
    on another machine (a deployment test box). I ran regasm /codebase on the
    dll. But, it doesn't work. It gives me the following error, "Class does not
    support Automation or does not support expected interface". I never got this
    error during development at all. I also tried regasm /tlb on the deployment
    box, but that does not change anything.

    What could be wrong?

    Thanks!


  • Jon

    #2
    Re: COM Interop [2.0]

    FYI, I do know that the line in VB6 that creates the class is working. The
    code does the following:

    *Psuedo-code start*
    Dim obj as New Attachment (attachment is the .Net 2 class)

    Connect to database (I can see this happening in the log, so the Dim as New
    above is not erroring)

    obj.DoStuff (it errors later, when calling a property or function ,not sure
    which)
    *End*


    "Jon" <ruffles_@msn.c om> wrote in message
    news:eODMXNfmGH A.4100@TK2MSFTN GP05.phx.gbl...[color=blue]
    >I have created a class library in v 2.0. I have set the COM Visible
    >attribute to True. Register for COM Interop is also checked in the IDE.
    >
    > I need to use the DLL from a VB6 application, so on the dev machine with
    > VB 6, I ran regasm /codebase. I was then able to add a reference to the
    > DLL and code against it. It runs fine and uses the .Net DLL perfectly.
    >
    > Now, I am trying to get the compiled VB 6 application to work with the DLL
    > on another machine (a deployment test box). I ran regasm /codebase on the
    > dll. But, it doesn't work. It gives me the following error, "Class does
    > not support Automation or does not support expected interface". I never
    > got this error during development at all. I also tried regasm /tlb on the
    > deployment box, but that does not change anything.
    >
    > What could be wrong?
    >
    > Thanks!
    >[/color]


    Comment

    Working...