DLL Question.

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

    #1

    DLL Question.

    Alright after much researching, I've come to the conclusion that I
    need to post this here hoping to get a solid answer. I'm looking to
    create a DLL that is capable of being used on all platforms that I
    mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
    hoping to be able to create this DLL via a 2.0 .net class library.
    Once its created I want the ability to reference this DLL along with
    all its methods and properties in both 1.1 .NET projects and an old
    ASP project. I know in regular ASP you can create.objects( ) and in
    1.1 you can just add references but I'm always unclear whether or not
    this is possible to do with a 2.0 DLL. I seen to always have problems
    adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
    Can anyone provide a reasonable answer to this question? The ideal
    situation i'm looking for is 2.0 coding and then using that in the
    other places. Does anyone have a solid answer out there?

  • Mr. Arnold

    #2
    Re: DLL Question.

    Does anyone have a solid answer out there?
    >
    You need a COM object created with COM solution like VB6 that can be called
    from a .NET solution like ASP.NET or other .NET solutions and by ASP 3.0 or
    lower that works with COM objects.


    Comment

    • Joe

      #3
      Re: DLL Question.

      On Jul 19, 3:54 pm, "Mr. Arnold" <MR. Arn...@Arnold.c omwrote:
      Does anyone have a solid answer out there?
      >
      You need a COM object created with COM solution like VB6 that can be called
      from a .NET solution like ASP.NET or other .NET solutions and by ASP 3.0 or
      lower that works with COM objects.
      Ok so does that mean there is no way to create this in a .NET 2.0
      framework project and then be used all over like you say with a COM
      solution? Are you saying the only way to do this, would be to use VB6
      or just create a COM like the way VB6 does? Thanks for any additional
      information

      Comment

      • Phill W.

        #4
        Re: DLL Question.

        Joe wrote:
        I'm looking to create a DLL that is capable of being used on all
        platforms that I mentioned in my subject (1.1 framework,
        2.0 framework, old ASP) I'm hoping to be able to create this DLL
        via a 2.0 .net class library.
        Then you're out of luck.

        A COM application (ASP) can load Fx2.0 assemblies.
        So can an Fx2.0 application.
        But an Fx1.1 application /will not/ load an Fx2.0 assembly.
        Once its created I want the ability to reference this DLL along with
        all its methods and properties in both 1.1 .NET projects and an old
        ASP project.
        Then you're going to /have/ to build it in Fx1.1.
        Both FX1.1 and Fx2.0 applications will be able to load it.
        Getting it to work from ASP may be more of an issue, because
        Inter-Op'ing from COM to .Net gets "tricky" when you have multiple
        Frameworks installed on the host. COM will always try to load the
        /latest/ one (Fx2.0) even though you /may/ not want it to.
        I seen to always have problems adding a reference to a DLL in 1.1
        when the DLL was created in 2.0.
        That's an understatement - it is simply not possible (AFAIK).

        HTH,
        Phill W.

        Comment

        • joe

          #5
          Re: DLL Question.

          >
          Then you're out of luck.
          >
          A COM application (ASP) can load Fx2.0 assemblies.
          So can an Fx2.0 application.
          But an Fx1.1 application /will not/ load an Fx2.0 assembly.
          >
          >
          Then you're going to /have/ to build it in Fx1.1.
          Both FX1.1 and Fx2.0 applications will be able to load it.
          Getting it to work from ASP may be more of an issue, because
          Inter-Op'ing from COM to .Net gets "tricky" when you have multiple
          Frameworks installed on the host. COM will always try to load the
          /latest/ one (Fx2.0) even though you /may/ not want it to.
          >
          Phill,
          So are you saying that I can use VB6, and inside VB6 load up a 2.0fx
          DLL and have access to all its methods and properties? Then from there
          once I create the COM object via VB6 (with my 2.0 DLL being used) I would
          be able to load that COM DLL into 1.1 and use accordingly? For a little
          clarification, I have a DLL written in 2.0 that I need to be able to use in
          1.1 and in ASP3.0. Would the above allow me to do this? Just looking for
          a little clarification :)

          Thanks

          Comment

          • bruce barker

            #6
            Re: DLL Question.

            your have 4 options:

            1) a com object built with an unmanaged language
            2) a com object built with .net 1.1
            3) a com object built with .net 2.0 but hosted by com+ (dcom)
            4) a .net 2.0 webservice


            -- bruce (sqlwork.com)

            Joe wrote:
            Alright after much researching, I've come to the conclusion that I
            need to post this here hoping to get a solid answer. I'm looking to
            create a DLL that is capable of being used on all platforms that I
            mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
            hoping to be able to create this DLL via a 2.0 .net class library.
            Once its created I want the ability to reference this DLL along with
            all its methods and properties in both 1.1 .NET projects and an old
            ASP project. I know in regular ASP you can create.objects( ) and in
            1.1 you can just add references but I'm always unclear whether or not
            this is possible to do with a 2.0 DLL. I seen to always have problems
            adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
            Can anyone provide a reasonable answer to this question? The ideal
            situation i'm looking for is 2.0 coding and then using that in the
            other places. Does anyone have a solid answer out there?
            >

            Comment

            • George Ter-Saakov

              #7
              Re: DLL Question.

              My guess the best solution here is to create COM object in regular VB or C++
              and then create 2 wrappers, one for .NET 1.1 and another for .NET 2.0

              George.



              "Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-kwrote in message
              news:f7qjbd$op3 $1@south.jnrs.j a.net...
              Joe wrote:
              >
              >I'm looking to create a DLL that is capable of being used on all
              >platforms that I mentioned in my subject (1.1 framework,
              >2.0 framework, old ASP) I'm hoping to be able to create this DLL
              >via a 2.0 .net class library.
              >
              Then you're out of luck.
              >
              A COM application (ASP) can load Fx2.0 assemblies.
              So can an Fx2.0 application.
              But an Fx1.1 application /will not/ load an Fx2.0 assembly.
              >
              >Once its created I want the ability to reference this DLL along with
              >all its methods and properties in both 1.1 .NET projects and an old
              >ASP project.
              >
              Then you're going to /have/ to build it in Fx1.1.
              Both FX1.1 and Fx2.0 applications will be able to load it.
              Getting it to work from ASP may be more of an issue, because Inter-Op'ing
              from COM to .Net gets "tricky" when you have multiple Frameworks installed
              on the host. COM will always try to load the /latest/ one (Fx2.0) even
              though you /may/ not want it to.
              >
              >I seen to always have problems adding a reference to a DLL in 1.1
              >when the DLL was created in 2.0.
              >
              That's an understatement - it is simply not possible (AFAIK).
              >
              HTH,
              Phill W.

              Comment

              • joe

                #8
                Re: DLL Question.

                bruce barker <nospam@nospam. comwrote in news:#c4gtFuyHH A.1212
                @TK2MSFTNGP05.p hx.gbl:
                3) a com object built with .net 2.0 but hosted by com+ (dcom)

                Would this option allow me to use the 2.0 COM hosted by com+ DLL in 1.1 /
                ASP / 2.0 by doing what you explain here?

                Comment

                • Mr. Arnold

                  #9
                  Re: DLL Question.


                  "Joe" <eternale1@gmai l.comwrote in message
                  news:1184940619 .771345.321170@ e16g2000pri.goo glegroups.com.. .
                  On Jul 19, 3:54 pm, "Mr. Arnold" <MR. Arn...@Arnold.c omwrote:
                  Does anyone have a solid answer out there?
                  >>
                  >You need a COM object created with COM solution like VB6 that can be
                  >called
                  >from a .NET solution like ASP.NET or other .NET solutions and by ASP 3.0
                  >or
                  >lower that works with COM objects.
                  >
                  Ok so does that mean there is no way to create this in a .NET 2.0
                  framework project and then be used all over like you say with a COM
                  solution? Are you saying the only way to do this, would be to use VB6
                  or just create a COM like the way VB6 does? Thanks for any additional
                  information
                  The replacement for COM commincations in .NET is .NET Remoting. You cannot
                  make a COM object in .NET. However, .NET can interface with a COM object.

                  http://msdn.microsoft.com/msdnmag/issues/01/08/interop/


                  ASP 3.0 and lower are not .Net solutions. You want to make a COM object,
                  then you need to be using a COM solution to develop it. VB 6 is where you
                  can code and make a COM object or DLL

                  Comment

                  • Bob Altman

                    #10
                    Re: DLL Question.

                    The short answer is Yes, you can create the DLL in VS 2005 (2.0 framework)
                    and call into it from all of the platforms you mention.

                    You can't reference a 2.0 assembly directly from VS 2003 or ASP, but you can
                    get to it through COM interop. If you're programming in VB, just navigate
                    to My Project in Solution Explorer, select the Application tab, click on
                    Assembly Information, and check "Make assembly COM-visible". I've never
                    needed to do this, so I've never played with it myself. I think that's all
                    there is to it, but I'm sure someone else can correct me if I've missed
                    something...

                    - Bob

                    "Joe" <eternale1@gmai l.comwrote in message
                    news:1184877779 .766758.5980@x4 0g2000prg.googl egroups.com...
                    Alright after much researching, I've come to the conclusion that I
                    need to post this here hoping to get a solid answer. I'm looking to
                    create a DLL that is capable of being used on all platforms that I
                    mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
                    hoping to be able to create this DLL via a 2.0 .net class library.
                    Once its created I want the ability to reference this DLL along with
                    all its methods and properties in both 1.1 .NET projects and an old
                    ASP project. I know in regular ASP you can create.objects( ) and in
                    1.1 you can just add references but I'm always unclear whether or not
                    this is possible to do with a 2.0 DLL. I seen to always have problems
                    adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
                    Can anyone provide a reasonable answer to this question? The ideal
                    situation i'm looking for is 2.0 coding and then using that in the
                    other places. Does anyone have a solid answer out there?
                    >

                    Comment

                    • Michel Posseth  [MCP]

                      #11
                      Re: DLL Question.


                      I thought once the same as you but in practice

                      As soon as you try to reference the the 2.0 ( COM ) object in VS.Net <
                      2005 ( 2002 , 2003 ) you wil receive an error as the assembly type is
                      unknown
                      so the short answer is No :-(

                      However the other way around is no problem 2002 , 2003 in 2005 ,also in VB6
                      and classic Asp it wil work however ofcourse the framework should be
                      installed and the assembly must be com registred with Regasm


                      as small copy paste example i once showed in this newsgroup




                      this was actually a snip from a project i had these days and it run in very
                      COM capable language ( tested in Delphi , VB6 , C++ and yes even in Clipper
                      :-)

                      regards

                      Michel




                      "Bob Altman" <rda@nospam.nos pamschreef in bericht
                      news:uyRFPgwyHH A.3588@TK2MSFTN GP06.phx.gbl...
                      The short answer is Yes, you can create the DLL in VS 2005 (2.0 framework)
                      and call into it from all of the platforms you mention.
                      >
                      You can't reference a 2.0 assembly directly from VS 2003 or ASP, but you
                      can get to it through COM interop. If you're programming in VB, just
                      navigate to My Project in Solution Explorer, select the Application tab,
                      click on Assembly Information, and check "Make assembly COM-visible".
                      I've never needed to do this, so I've never played with it myself. I
                      think that's all there is to it, but I'm sure someone else can correct me
                      if I've missed something...
                      >
                      - Bob
                      >
                      "Joe" <eternale1@gmai l.comwrote in message
                      news:1184877779 .766758.5980@x4 0g2000prg.googl egroups.com...
                      >Alright after much researching, I've come to the conclusion that I
                      >need to post this here hoping to get a solid answer. I'm looking to
                      >create a DLL that is capable of being used on all platforms that I
                      >mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
                      >hoping to be able to create this DLL via a 2.0 .net class library.
                      >Once its created I want the ability to reference this DLL along with
                      >all its methods and properties in both 1.1 .NET projects and an old
                      >ASP project. I know in regular ASP you can create.objects( ) and in
                      >1.1 you can just add references but I'm always unclear whether or not
                      >this is possible to do with a 2.0 DLL. I seen to always have problems
                      >adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
                      >Can anyone provide a reasonable answer to this question? The ideal
                      >situation i'm looking for is 2.0 coding and then using that in the
                      >other places. Does anyone have a solid answer out there?
                      >>
                      >
                      >

                      Comment

                      • Phill W.

                        #12
                        Re: DLL Question.

                        joe wrote:
                        >Then you're out of luck.
                        >>
                        >A COM application (ASP) can load Fx2.0 assemblies.
                        >So can an Fx2.0 application.
                        >But an Fx1.1 application /will not/ load an Fx2.0 assembly.
                        >>
                        >>
                        >Then you're going to /have/ to build it in Fx1.1.
                        >Both FX1.1 and Fx2.0 applications will be able to load it.
                        >Getting it to work from ASP may be more of an issue, because
                        >Inter-Op'ing from COM to .Net gets "tricky" when you have multiple
                        >Frameworks installed on the host. COM will always try to load the
                        >/latest/ one (Fx2.0) even though you /may/ not want it to.
                        So are you saying that I can use VB6, and inside VB6 load up a 2.0fx
                        DLL and have access to all its methods and properties?
                        Assuming the Fx2.0 Dll is exposed to COM, yes.
                        Then from there once I create the COM object via VB6 (with my 2.0 DLL
                        being used) I would be able to load that COM DLL into 1.1 and use
                        accordingly?
                        Maybe. Maybe not.

                        Your 1.1 process would load the 1.1 runtime, then go out into COM world
                        to load your VB6 Dll, and from there [try to] load the 2.0 Dll.
                        I /think/ that's where it would fall down, because you'd be loading a
                        second version of the runtime into the same process and I don't /think/
                        that will work.
                        For a little clarification, I have a DLL written in 2.0 that I need to be
                        able to use in 1.1 and in ASP3.0.
                        Would the above allow me to do this?
                        Just looking for a little clarification :)
                        Try it! And let us know how you get on ...

                        Regards,
                        Phill W.

                        Comment

                        Working...