Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. com dll problem

com dll problem

Scheduled Pinned Locked Moved C / C++ / MFC
comhelp
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rjkg
    wrote on last edited by
    #1

    I am using two third party com dll . I am facing the problem that their clsids are same ,so i can use only one dll. but my project requirement is to use both the dll . Is their any way to change the clsid of the com dll . any binay tool etc. any another trick.

    Rajesh

    N R K 3 Replies Last reply
    0
    • R rjkg

      I am using two third party com dll . I am facing the problem that their clsids are same ,so i can use only one dll. but my project requirement is to use both the dll . Is their any way to change the clsid of the com dll . any binay tool etc. any another trick.

      Rajesh

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      rajeshgupta1253 wrote:

      clsids are same

      Is it the name that's the same or the GUIDs(it can't be)? ATL COM DLLs come with namespaces if you have the tlb file associated with them, namespaces does help avoid such cases. Then there is a rename attribute that can be used with a tlb file while using #import. From MSDN: The rename attribute is used to work around name collision problems. If this attribute is specified, the compiler replaces all occurrences of OldName in a type library with the user-supplied NewName in the resulting header files.

      Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

      R 1 Reply Last reply
      0
      • N Nibu babu thomas

        rajeshgupta1253 wrote:

        clsids are same

        Is it the name that's the same or the GUIDs(it can't be)? ATL COM DLLs come with namespaces if you have the tlb file associated with them, namespaces does help avoid such cases. Then there is a rename attribute that can be used with a tlb file while using #import. From MSDN: The rename attribute is used to work around name collision problems. If this attribute is specified, the compiler replaces all occurrences of OldName in a type library with the user-supplied NewName in the resulting header files.

        Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

        R Offline
        R Offline
        rjkg
        wrote on last edited by
        #3

        guids are same

        Rajesh

        1 Reply Last reply
        0
        • R rjkg

          I am using two third party com dll . I am facing the problem that their clsids are same ,so i can use only one dll. but my project requirement is to use both the dll . Is their any way to change the clsid of the com dll . any binay tool etc. any another trick.

          Rajesh

          R Offline
          R Offline
          Roger Stoltz
          wrote on last edited by
          #4

          :confused: This is supposed to be a no-no.... If the two servers have the same class id, then it is the same server, by definition and by COM spec. It may be that the later server is an updated version, but it is still the same server. If the supplier of the two servers claims that those are two different servers, they have broken some of the fundamental rules of COM and there are no guarantees for this to work when distributed even if you might get it to work on your machine. The human readable ProgID may be updated with a new version from e.g. <Company>.<Server>.1 to <Company>.<Server>.2, then they also have to give the server a new class id. If the supplier of the two servers confirms that this is the same server, then your project requirements are wrong or misinterpreted since this is not how the COM architecture works. It may give a hint if you compare the ProgIDs.

          "It's supposed to be hard, otherwise anybody could do it!" - selfquote
          "High speed never compensates for wrong direction!" - unknown

          K 1 Reply Last reply
          0
          • R rjkg

            I am using two third party com dll . I am facing the problem that their clsids are same ,so i can use only one dll. but my project requirement is to use both the dll . Is their any way to change the clsid of the com dll . any binay tool etc. any another trick.

            Rajesh

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            Different CLSID for different modules is a primary role for COM. The CLSID should be changed if there is no compatibility in the interface!!!! :doh: You better explain the creators of the dlls that the same CLSID are crappy. I bet that they came from the same person who hasnt enough experience to deal with COM. X|

            Greetings from Germany

            1 Reply Last reply
            0
            • R Roger Stoltz

              :confused: This is supposed to be a no-no.... If the two servers have the same class id, then it is the same server, by definition and by COM spec. It may be that the later server is an updated version, but it is still the same server. If the supplier of the two servers claims that those are two different servers, they have broken some of the fundamental rules of COM and there are no guarantees for this to work when distributed even if you might get it to work on your machine. The human readable ProgID may be updated with a new version from e.g. <Company>.<Server>.1 to <Company>.<Server>.2, then they also have to give the server a new class id. If the supplier of the two servers confirms that this is the same server, then your project requirements are wrong or misinterpreted since this is not how the COM architecture works. It may give a hint if you compare the ProgIDs.

              "It's supposed to be hard, otherwise anybody could do it!" - selfquote
              "High speed never compensates for wrong direction!" - unknown

              K Offline
              K Offline
              KarstenK
              wrote on last edited by
              #6

              I guess the coders had a sample project and had written some code but not changed the CLSIDs. :mad:

              Greetings from Germany

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups