Share Class Library over network???

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

    Share Class Library over network???

    Is there a way to do this without having to register it
    computer-by-computer???

    tried everything already... but nothign worked out as should..

    tks..


  • Dick Grier

    #2
    Re: Share Class Library over network???

    Hi,

    It is hard to tell exactly what you want to do. However, perhaps it is
    Remoting or a Webservice, both of which provide "objects" over a network
    connection. You might start here (though there are many more articles on
    these subjects)


    Dick

    --
    Richard Grier, MVP
    Hard & Software
    Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
    Edition,
    ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
    2006.
    See www.hardandsoftware.net for details and contact information.


    Comment

    • Christiano Donke

      #3
      Re: Share Class Library over network???

      What I need is not that hard...

      I made an Class Lib in VB.NET (VS2005), that will be called from a VB6
      App... so far, no problems.... Everything was working out just fine..

      But This vb6 app is shared over a company network.. And I don't want to
      have to register it into all computers..
      This .net lib is used to get some data and write a XML..

      I'll read this article and the give you a feedback..

      tks...

      "Dick Grier" <dick_grierNOSP AM@.msn.comescr eveu na mensagem
      news:e9L9RsUAJH A.1748@TK2MSFTN GP02.phx.gbl...
      Hi,
      >
      It is hard to tell exactly what you want to do. However, perhaps it is
      Remoting or a Webservice, both of which provide "objects" over a network
      connection. You might start here (though there are many more articles on
      these subjects)

      >
      Dick
      >
      --
      Richard Grier, MVP
      Hard & Software
      Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
      Edition,
      ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
      2006.
      See www.hardandsoftware.net for details and contact information.
      >

      Comment

      • Patrice

        #4
        Re: Share Class Library over network???

        So this is seen as a COM component and AFAIK a COM component necessarily
        needs to be registered. Now you could perhaps use the regasm command line
        tool and see if you could launch this from a login script :


        I've seen a "COM registration free" feature but this is the other way round
        (ie .NET is able to use a COM component by using information from an xml
        file rather than by looking this in the registry).

        Ah ! from a quick look it looks like a bit broader than that. Try perhaps
        around :
        Use registration-free COM interop to activate a component without using the Windows registry to store assembly information.

        and in particular http://msdn.microsoft.com/en-us/library/eew13bza.aspx

        A bit hard but at first sight it looks like you should be able to create a
        manifest file for your COM application so that it knows about managed
        components and a manifest in your managed component that match so that the
        COM component can see the .NET component without any registry handling...

        Good luck.

        --
        Patrice

        "Christiano Donke" <cdonke@digiexp ress.com.bra écrit dans le message de
        groupe de discussion : #nNhJyUAJHA.380 4@TK2MSFTNGP05. phx.gbl...
        What I need is not that hard...
        >
        I made an Class Lib in VB.NET (VS2005), that will be called from a VB6
        App... so far, no problems.... Everything was working out just fine..
        >
        But This vb6 app is shared over a company network.. And I don't want to
        have to register it into all computers..
        This .net lib is used to get some data and write a XML..
        >
        I'll read this article and the give you a feedback..
        >
        tks...
        >
        "Dick Grier" <dick_grierNOSP AM@.msn.comescr eveu na mensagem
        news:e9L9RsUAJH A.1748@TK2MSFTN GP02.phx.gbl...
        >Hi,
        >>
        >It is hard to tell exactly what you want to do. However, perhaps it is
        >Remoting or a Webservice, both of which provide "objects" over a network
        >connection. You might start here (though there are many more articles on
        >these subjects)
        >http://www.vbdotnetheaven.com/Upload...tRemoting.aspx
        >>
        >Dick
        >>
        >--
        >Richard Grier, MVP
        >Hard & Software
        >Author of Visual Basic Programmer's Guide to Serial Communications,
        >Fourth Edition,
        >ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
        >2006.
        >See www.hardandsoftware.net for details and contact information.
        >>
        >
        >

        Comment

        • Michel Posseth  [MCP]

          #5
          Re: Share Class Library over network???


          Well in that case

          Asuming you used COM ( shouldn`t know how you could call a VS dll
          otherwise from a VB6 app ) the VS.Net assembly follows the standard COM
          rules
          wich means that you must register the assembly in the local registry ,
          however your VB6 app could do that on startup ( the needed reg file can be
          generated by regasm.exe , see the options of this tool )

          An VS.Net COM assembly must be located in the GAC , The system32 or the
          calling application directory so if the VB6 executable is also located on
          the network share in the same folder as the VS.Net COM assembly this should
          work .

          Another option would be to start a .Net executable with parameters ( through
          shell ) and that this would call the dll through .Net in that way nothing
          needs to be registred on the systems.

          Ofcourse above would only work if it is allowed to start .Net assembly`s on
          a networked drive , wich is standard not the case
          use this tool to adjust the assembly privilige , note that the system
          administrator can do this company wide with a group policy


          hth

          Michel Posseth [MCP]
          VB6 , VB.Net Coder


          "Christiano Donke" <cdonke@digiexp ress.com.brschr eef in bericht
          news:%23nNhJyUA JHA.3804@TK2MSF TNGP05.phx.gbl. ..
          What I need is not that hard...
          >
          I made an Class Lib in VB.NET (VS2005), that will be called from a VB6
          App... so far, no problems.... Everything was working out just fine..
          >
          But This vb6 app is shared over a company network.. And I don't want to
          have to register it into all computers..
          This .net lib is used to get some data and write a XML..
          >
          I'll read this article and the give you a feedback..
          >
          tks...
          >
          "Dick Grier" <dick_grierNOSP AM@.msn.comescr eveu na mensagem
          news:e9L9RsUAJH A.1748@TK2MSFTN GP02.phx.gbl...
          >Hi,
          >>
          >It is hard to tell exactly what you want to do. However, perhaps it is
          >Remoting or a Webservice, both of which provide "objects" over a network
          >connection. You might start here (though there are many more articles on
          >these subjects)
          >http://www.vbdotnetheaven.com/Upload...tRemoting.aspx
          >>
          >Dick
          >>
          >--
          >Richard Grier, MVP
          >Hard & Software
          >Author of Visual Basic Programmer's Guide to Serial Communications,
          >Fourth Edition,
          >ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
          >2006.
          >See www.hardandsoftware.net for details and contact information.
          >>
          >
          >

          Comment

          • Michel Posseth  [MCP]

            #6
            Re: Share Class Library over network???

            Patrice

            AFAIK

            This is not possible as VB6 must be aware of the VS.Net COM component
            it is in this case VB6 that must initialize the COM wrapper of the VS.Net
            managed object VB6 just does a lookup of the clsid in the registry and
            alternatively looks up the install location there , if it is not availlable
            it wil look in the application directory , the GAC and the system32
            directory for the component if it does not find a match it blows up with a
            runtime error 91 "Object variable or with block not set"

            It would realy suprise me if it would behave different as described above ,
            but hey i learn something new every day :-)

            Michel



            "Patrice" <http://www.chez.com/scribe/schreef in bericht
            news:%234jLVjVA JHA.1588@TK2MSF TNGP03.phx.gbl. ..
            So this is seen as a COM component and AFAIK a COM component necessarily
            needs to be registered. Now you could perhaps use the regasm command line
            tool and see if you could launch this from a login script :

            >
            I've seen a "COM registration free" feature but this is the other way
            round (ie .NET is able to use a COM component by using information from an
            xml file rather than by looking this in the registry).
            >
            Ah ! from a quick look it looks like a bit broader than that. Try perhaps
            around :
            Use registration-free COM interop to activate a component without using the Windows registry to store assembly information.

            and in particular http://msdn.microsoft.com/en-us/library/eew13bza.aspx
            >
            A bit hard but at first sight it looks like you should be able to create a
            manifest file for your COM application so that it knows about managed
            components and a manifest in your managed component that match so that the
            COM component can see the .NET component without any registry handling...
            >
            Good luck.
            >
            --
            Patrice
            >
            "Christiano Donke" <cdonke@digiexp ress.com.bra écrit dans le message de
            groupe de discussion : #nNhJyUAJHA.380 4@TK2MSFTNGP05. phx.gbl...
            >What I need is not that hard...
            >>
            > I made an Class Lib in VB.NET (VS2005), that will be called from a VB6
            >App... so far, no problems.... Everything was working out just fine..
            >>
            > But This vb6 app is shared over a company network.. And I don't want
            >to have to register it into all computers..
            > This .net lib is used to get some data and write a XML..
            >>
            > I'll read this article and the give you a feedback..
            >>
            >tks...
            >>
            >"Dick Grier" <dick_grierNOSP AM@.msn.comescr eveu na mensagem
            >news:e9L9RsUAJ HA.1748@TK2MSFT NGP02.phx.gbl.. .
            >>Hi,
            >>>
            >>It is hard to tell exactly what you want to do. However, perhaps it is
            >>Remoting or a Webservice, both of which provide "objects" over a network
            >>connection. You might start here (though there are many more articles
            >>on these subjects)
            >>http://www.vbdotnetheaven.com/Upload...tRemoting.aspx
            >>>
            >>Dick
            >>>
            >>--
            >>Richard Grier, MVP
            >>Hard & Software
            >>Author of Visual Basic Programmer's Guide to Serial Communications,
            >>Fourth Edition,
            >>ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised
            >>March 2006.
            >>See www.hardandsoftware.net for details and contact information.
            >>>
            >>
            >>
            >

            Comment

            • Dick Grier

              #7
              Re: Share Class Library over network???

              If it is COM (and that is what is required for an object from VB6, written
              in .NET), then it has to be registered.

              I think a better scenario might be to provide a network service via sockets
              or a webservice. If you use Sockets, you have to write the
              interface/communications code using Winsock on the VB6 side, and
              System.Net.Sock ets on the .NET side. If you go with a webservice, then you
              can try the SoapSDK toolkit for VB6. This is deprecated, but I suspect that
              it may still be available (even if you use sockets, this toolkit might be
              useful, so that you could use XML more easily on the VB6 side).

              Since this is a VB6 application, personally, I'd live with the limitation(s)
              of VB6, and simply register the component on each machine. After all,
              that's what you had to do to install the program, or to make any major
              modifications to it -- and this is a major modification.

              Dick

              --
              Richard Grier, MVP
              Hard & Software
              Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
              Edition,
              ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
              2006.
              See www.hardandsoftware.net for details and contact information.


              Comment

              • Chris Dunaway

                #8
                Re: Share Class Library over network???

                On Aug 19, 11:22 am, "Dick Grier" <dick_grierNOSP AM@.msn.comwrot e:
                If it is COM (and that is what is required for an object from VB6, written
                in .NET), then it has to be registered.
                >
                I think a better scenario might be to provide a network service via sockets
                or a webservice. If you use Sockets, you have to write the
                interface/communications code using Winsock on the VB6 side, and
                System.Net.Sock ets on the .NET side. If you go with a webservice, then you
                can try the SoapSDK toolkit for VB6. This is deprecated, but I suspect that
                it may still be available (even if you use sockets, this toolkit might be
                useful, so that you could use XML more easily on the VB6 side).
                >
                Since this is a VB6 application, personally, I'd live with the limitation(s)
                of VB6, and simply register the component on each machine. After all,
                that's what you had to do to install the program, or to make any major
                modifications to it -- and this is a major modification.
                >
                Dick
                >
                --
                Richard Grier, MVP
                Hard & Software
                Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
                Edition,
                ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
                2006.
                Seewww.hardands oftware.netfor details and contact information.
                I haven't tried it yet, but I ran across this:



                Chris

                Comment

                Working...