adding a COM dll as reference during runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krishm
    New Member
    • Jul 2007
    • 5

    adding a COM dll as reference during runtime

    hi

    i have a COM dll and i want to access the methods in the dll through my program. but i need to add that dll as reference during runtime and not the way references are generally added (project-->add reference-->COM and all that)

    can anybody help me out with this plz

    thanx
    krish
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by krishm
    hi

    i have a COM dll and i want to access the methods in the dll through my program. but i need to add that dll as reference during runtime and not the way references are generally added (project-->add reference-->COM and all that)

    can anybody help me out with this plz

    thanx
    krish
    What is your purpose of adding a dll in runtime???

    Comment

    • krishm
      New Member
      • Jul 2007
      • 5

      #3
      Originally posted by dip_developer
      What is your purpose of adding a dll in runtime???

      actually i need to do so because i have a couple of components in more than 1 dll and according to some condition i need to access them.

      i'll give u the scenario

      switch(some condition)
      {
      case 1:
      // access method from dll1.dll
      case 2:
      //access method from dll2.dll
      case 3:
      //access method from dll3.dll
      default:
      //some default method
      }

      so according to the condition the appropriate dll would be referenced

      plz help me if u can on this matter

      thnx and regards

      krish

      Comment

      • dip_developer
        Recognized Expert Contributor
        • Aug 2006
        • 648

        #4
        Originally posted by krishm
        actually i need to do so because i have a couple of components in more than 1 dll and according to some condition i need to access them.

        i'll give u the scenario

        switch(some condition)
        {
        case 1:
        // access method from dll1.dll
        case 2:
        //access method from dll2.dll
        case 3:
        //access method from dll3.dll
        default:
        //some default method
        }

        so according to the condition the appropriate dll would be referenced

        plz help me if u can on this matter

        thnx and regards

        krish
        ok fine....then why are you trying to Reference the .dll in runtime.....
        you have to call the methods of those dlls in runtime......but why referencing them in runtime????.... ..

        add the reference of those dll s while designing your project.....as simple as that....

        Comment

        • krishm
          New Member
          • Jul 2007
          • 5

          #5
          Originally posted by dip_developer
          ok fine....then why are you trying to Reference the .dll in runtime.....
          you have to call the methods of those dlls in runtime......but why referencing them in runtime????.... ..

          add the reference of those dll s while designing your project.....as simple as that....

          thanx a lot for taking intrest

          wat u r saying is absolutely correct but i dont want it that way. i already mentioned it thati want to reference the dlls at runtime and not prior to that.

          actually they r needed to add at runtime because lets say that the dlls are only available during the runtime.

          i just need to know that whether it is possible or not and if yes then how to do it.

          plz let me know if u can help

          thanks and regards

          krish

          Comment

          Working...