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#
  4. COM interop and embedding

COM interop and embedding

Scheduled Pinned Locked Moved C#
comcsharphardwarequestion
3 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.
  • T Offline
    T Offline
    therealmccoy
    wrote on last edited by
    #1

    I have a project that uses a COM DLL. .NET created an interop assembly for me. I want to embed the DLL and the interop (Type Library ?) within my application so as to have a single file execution(the executable). Is this possible? I have tried adding the files as embedded resources, but still get a file not found exception when I run the application. Thanks www.lovethosetrains.com

    M 1 Reply Last reply
    0
    • T therealmccoy

      I have a project that uses a COM DLL. .NET created an interop assembly for me. I want to embed the DLL and the interop (Type Library ?) within my application so as to have a single file execution(the executable). Is this possible? I have tried adding the files as embedded resources, but still get a file not found exception when I run the application. Thanks www.lovethosetrains.com

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      Hi! You can't embed other assemblies in your executable as resources and expect the framework to find them. Resources are for images, strings and so on, not for compiled code! There is a tool, though, that can wrap all assemblies your application needs into a single executable: http://research.microsoft.com/~mbarnett/ILMerge.aspx But if you access COM objects, these cannot be merged into your application at all, only the interop assembly. Regards, mav -- Black holes are the places where god divided by 0...

      T 1 Reply Last reply
      0
      • M mav northwind

        Hi! You can't embed other assemblies in your executable as resources and expect the framework to find them. Resources are for images, strings and so on, not for compiled code! There is a tool, though, that can wrap all assemblies your application needs into a single executable: http://research.microsoft.com/~mbarnett/ILMerge.aspx But if you access COM objects, these cannot be merged into your application at all, only the interop assembly. Regards, mav -- Black holes are the places where god divided by 0...

        T Offline
        T Offline
        therealmccoy
        wrote on last edited by
        #3

        Thanks for the suggestion... Once I sober up and feel like working on real work again I'll give it a try.. I downloaded ILMerge at work, and breifly thought about working with it at home and then realized I don't get paid for it. I'm sure the best will get later this weekend... once again thanks.. reads like what I am looking for. :) www.lovethosetrains.com

        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