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. COM
  4. How to make my com object can be used by C# using add reference operation?

How to make my com object can be used by C# using add reference operation?

Scheduled Pinned Locked Moved COM
c++csharpcomhelptutorial
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.
  • K Offline
    K Offline
    kcynic
    wrote on last edited by
    #1

    Im a newbie for com programming. If i create my com object by ATL wizards, the target com dll can be easily added by C# project using Add Reference operation. But, if i build my com dll by handle, writting all classes and idl file by hands, i will find it can't be added by C#. the error message says:"*** couldn't be added. Please make sure that the file is accessible,and that is a valid assembly or COM component". Of course the target dll is a COM component! I can use it in any C++ projects successfully. Why? Regards.

    _ 1 Reply Last reply
    0
    • K kcynic

      Im a newbie for com programming. If i create my com object by ATL wizards, the target com dll can be easily added by C# project using Add Reference operation. But, if i build my com dll by handle, writting all classes and idl file by hands, i will find it can't be added by C#. the error message says:"*** couldn't be added. Please make sure that the file is accessible,and that is a valid assembly or COM component". Of course the target dll is a COM component! I can use it in any C++ projects successfully. Why? Regards.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Its probably because the type library information is not available inside the COM DLL. You will have to include the library information as a resource for this. Please read the document on how this is done.

      «_Superman_» I love work. It gives me something to do between weekends.

      K 1 Reply Last reply
      0
      • _ _Superman_

        Its probably because the type library information is not available inside the COM DLL. You will have to include the library information as a resource for this. Please read the document on how this is done.

        «_Superman_» I love work. It gives me something to do between weekends.

        K Offline
        K Offline
        kcynic
        wrote on last edited by
        #3

        oh, thanks for your reply. im reading the book named Inside COM. i hope i will resolve this problem when i learn further. regards.

        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