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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. What to do with dependent assemblies when using a COM wrapper.

What to do with dependent assemblies when using a COM wrapper.

Scheduled Pinned Locked Moved .NET (Core and Framework)
questioncsharpcom
4 Posts 2 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.
  • G Offline
    G Offline
    Gary Hyslop at home
    wrote on last edited by
    #1

    I have created a COM object by wrappiing a .NET assembly using tlbexp. This assembly is dependent on another assembly which, in turn, is dependent on two third party assemblies (I can't rebuild them and give them "strong names"). How can I deploy these dependent assemblies (DLLs)so that the COM object will work? Gary Hyslop

    S 1 Reply Last reply
    0
    • G Gary Hyslop at home

      I have created a COM object by wrappiing a .NET assembly using tlbexp. This assembly is dependent on another assembly which, in turn, is dependent on two third party assemblies (I can't rebuild them and give them "strong names"). How can I deploy these dependent assemblies (DLLs)so that the COM object will work? Gary Hyslop

      S Offline
      S Offline
      Steven Campbell
      wrote on last edited by
      #2

      I can't rebuild them and give them "strong names" Actually, you can. Use ildasm.exe to disassemble, and then ilasm.exe to reassemble: ildasm /out:test.il unsigned.exe ilasm /resource=test.res /output=signed.exe /key=test.snk test.il In any case, as long as you deploy everything to the same directory, it should work fine, even without strong naming.


      my blog

      G 1 Reply Last reply
      0
      • S Steven Campbell

        I can't rebuild them and give them "strong names" Actually, you can. Use ildasm.exe to disassemble, and then ilasm.exe to reassemble: ildasm /out:test.il unsigned.exe ilasm /resource=test.res /output=signed.exe /key=test.snk test.il In any case, as long as you deploy everything to the same directory, it should work fine, even without strong naming.


        my blog

        G Offline
        G Offline
        Gary Hyslop at home
        wrote on last edited by
        #3

        I would be happy to deploy everything in the same directory. The problem is that I don't know which directory use. The main DLL (DLL_1), and the only one whose classes I wish to expose, has been registered by REGASM and is accessible to unmanaged code. Not being a "second generation" MS programmer, I don't know much about the registry -- except that the methods exposed by DLL_1 are visible using regedit -- but not DLL_1's physical location. I have placed copies of the other DLLs in various places (e.g. a) the bin directory of DLL_1's project and b) the directory that contains the copy of DLL_1 that was "REGASMed") without success. Any help making up for my generation2 deficiencies (Gen 2 > DOS and < .NET) would be greatly appreciated. By the way, do you think it will take ten years for Generation 2 to die? (I wrote DOS code in early 2003 and Generation 2 started in 1993). Gary Hyslop

        S 1 Reply Last reply
        0
        • G Gary Hyslop at home

          I would be happy to deploy everything in the same directory. The problem is that I don't know which directory use. The main DLL (DLL_1), and the only one whose classes I wish to expose, has been registered by REGASM and is accessible to unmanaged code. Not being a "second generation" MS programmer, I don't know much about the registry -- except that the methods exposed by DLL_1 are visible using regedit -- but not DLL_1's physical location. I have placed copies of the other DLLs in various places (e.g. a) the bin directory of DLL_1's project and b) the directory that contains the copy of DLL_1 that was "REGASMed") without success. Any help making up for my generation2 deficiencies (Gen 2 > DOS and < .NET) would be greatly appreciated. By the way, do you think it will take ten years for Generation 2 to die? (I wrote DOS code in early 2003 and Generation 2 started in 1993). Gary Hyslop

          S Offline
          S Offline
          Steven Campbell
          wrote on last edited by
          #4

          If you use the /codebase option of regasm.exe, then the registry will contain the path to that dll. If the other DLLs are .NET dlls then they can be in the same directory as DLL_1, and DLL_1 should find them fine.


          my blog

          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