Using a .NET-dll in VB6

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

    Using a .NET-dll in VB6

    Hello,

    I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I was
    unable to register the dll, but under Projekt|Referen ces, I can see the tlb
    just fine. But when running the VB6-exe on any computer I get an error
    message 'Run-time error 429'. ActiveX component can't create object. What
    could I do to make them work together?


  • Josip Habjan

    #2
    Re: Using a .NET-dll in VB6


    "Rudy" <re@geovision.d e> wrote in message
    news:OuBnvOKjDH A.2308@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hello,
    >
    > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I was
    > unable to register the dll, but under Projekt|Referen ces, I can see the[/color]
    tlb[color=blue]
    > just fine. But when running the VB6-exe on any computer I get an error
    > message 'Run-time error 429'. ActiveX component can't create object. What
    > could I do to make them work together?
    >[/color]

    You can't. ( there is no possibility )..

    Regards,
    Josip Habjan


    Comment

    • Armin Zingler

      #3
      Re: Using a .NET-dll in VB6

      "Rudy" <re@geovision.d e> schrieb[color=blue]
      > Hello,
      >
      > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
      > was unable to register the dll, but under Projekt|Referen ces, I can
      > see the tlb just fine. But when running the VB6-exe on any computer I
      > get an error message 'Run-time error 429'. ActiveX component can't
      > create object. What could I do to make them work together?[/color]

      Did you deploy the .NET DLL and register it on the other machine
      (regasm.exe)?


      --
      Armin

      Comment

      • c-yellow

        #4
        Re: Using a .NET-dll in VB6

        > Hello,
        : >
        : > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
        was
        : > unable to register the dll, but under Projekt|Referen ces, I can see the
        : tlb
        : > just fine. But when running the VB6-exe on any computer I get an error
        : > message 'Run-time error 429'. ActiveX component can't create object.
        What
        : > could I do to make them work together?
        : >
        :
        : You can't. ( there is no possibility )..
        :
        : Regards,
        : Josip Habjan

        i believe you are mistaken.
        :
        :


        Comment

        • Josip Habjan

          #5
          Re: Using a .NET-dll in VB6

          "c-yellow" <take_a_guess@H OTMAIL.COM> wrote in message
          news:XHugb.9503 $WX4.6325@newss vr33.news.prodi gy.com...[color=blue][color=green]
          > > Hello,[/color]
          > : >
          > : > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
          > was
          > : > unable to register the dll, but under Projekt|Referen ces, I can see[/color]
          the[color=blue]
          > : tlb
          > : > just fine. But when running the VB6-exe on any computer I get an error
          > : > message 'Run-time error 429'. ActiveX component can't create object.
          > What
          > : > could I do to make them work together?
          > : >
          > :
          > : You can't. ( there is no possibility )..
          > :
          > : Regards,
          > : Josip Habjan
          >
          > i believe you are mistaken.
          > :[/color]

          maby :o)


          Comment

          • Rudy

            #6
            Re: Using a .NET-dll in VB6

            Now it's working. Thank you very much for the regasm-tip.


            "Armin Zingler" <az.nospam@free net.de> schrieb im Newsbeitrag
            news:u5rckvKjDH A.1332@tk2msftn gp13.phx.gbl...[color=blue]
            > "Rudy" <re@geovision.d e> schrieb[color=green]
            > > Hello,
            > >
            > > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
            > > was unable to register the dll, but under Projekt|Referen ces, I can
            > > see the tlb just fine. But when running the VB6-exe on any computer I
            > > get an error message 'Run-time error 429'. ActiveX component can't
            > > create object. What could I do to make them work together?[/color]
            >
            > Did you deploy the .NET DLL and register it on the other machine
            > (regasm.exe)?
            >
            >
            > --
            > Armin
            >[/color]


            Comment

            • Armin Zingler

              #7
              Re: Using a .NET-dll in VB6

              "Rudy" <re@geovision.d e> schrieb[color=blue]
              > Now it's working. Thank you very much for the regasm-tip.[/color]

              Was a pleasure. :-)

              More information:

              <F1>
              Visual Studio.NET
              .NET Framework
              Programming with .NET Framework
              Interoperating with unmanaged code
              Exposing .NET framework components to COM


              ms-help://MS.VSCC.2003/MS.MSDNQTR.2003 FEB/dndotnet/html/callnetfrcom.ht m

              ms-help://MS.VSCC.2003/MS.MSDNQTR.2003 FEB/cpguide/html/cpconprimaryint eropas
              semblies.htm

              (see hints in signature)


              --
              Armin

              - Links might be split into two lines. Concatenate them using notepad.
              - Links might require to add a ".nnnn" after the "2003FEB", e.g.
              "2003FEB.10 33" for localized versions.
              - Links starting with "ms-help" are URLs for the document explorer (<F1>).
              Paste them in the URL textbox and press enter. Using internal help (menu
              tools -> options -> environment -> help), display the "Web" toolbar that
              contains the textbox.
              - The tree representing the table of contents has been translated from
              localized (German) version. Excuse slight deviations.

              Comment

              • Tom Spink

                #8
                Re: Using a .NET-dll in VB6

                Hi Rudy,

                You may need to take a look at COM interop. .NET assemblies aren't
                accessible through VB6, because they are managed code, and VB6 does not use
                the managed framework. COM interop will let you expose your classes through
                COM, and VB6 will let you use COM.

                The reason you can't create the object is because you haven't exposed any
                COM object.

                However, may I ask why you wish to do this? Can you not convert your VB6
                program to .NET?

                --
                HTH,
                -- Tom Spink, Über Geek

                Please respond to the newsgroup,
                so all can benefit

                " System.Reflecti on Master "

                ==== Converting to 2002 ====
                Remove inline declarations


                "Rudy" <re@geovision.d e> wrote in message
                news:OuBnvOKjDH A.2308@TK2MSFTN GP09.phx.gbl...[color=blue]
                > Hello,
                >
                > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I was
                > unable to register the dll, but under Projekt|Referen ces, I can see the[/color]
                tlb[color=blue]
                > just fine. But when running the VB6-exe on any computer I get an error
                > message 'Run-time error 429'. ActiveX component can't create object. What
                > could I do to make them work together?
                >
                >[/color]


                Comment

                • Tom Spink

                  #9
                  Re: Using a .NET-dll in VB6

                  Hi Josip,

                  Take a look at my post

                  --
                  HTH,
                  -- Tom Spink, Über Geek

                  Please respond to the newsgroup,
                  so all can benefit

                  " System.Reflecti on Master "

                  ==== Converting to 2002 ====
                  Remove inline declarations


                  "Josip Habjan" <jhabjan(at)dig ital(dot)hr> wrote in message
                  news:uxe39yKjDH A.1696@TK2MSFTN GP12.phx.gbl...[color=blue]
                  > "c-yellow" <take_a_guess@H OTMAIL.COM> wrote in message
                  > news:XHugb.9503 $WX4.6325@newss vr33.news.prodi gy.com...[color=green][color=darkred]
                  > > > Hello,[/color]
                  > > : >
                  > > : > I wrote a DLL in VB.NET and we need to use it inside a VB6-program.[/color][/color]
                  I[color=blue][color=green]
                  > > was
                  > > : > unable to register the dll, but under Projekt|Referen ces, I can see[/color]
                  > the[color=green]
                  > > : tlb
                  > > : > just fine. But when running the VB6-exe on any computer I get an[/color][/color]
                  error[color=blue][color=green]
                  > > : > message 'Run-time error 429'. ActiveX component can't create object.
                  > > What
                  > > : > could I do to make them work together?
                  > > : >
                  > > :
                  > > : You can't. ( there is no possibility )..
                  > > :
                  > > : Regards,
                  > > : Josip Habjan
                  > >
                  > > i believe you are mistaken.
                  > > :[/color]
                  >
                  > maby :o)
                  >
                  >[/color]


                  Comment

                  Working...