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. C# COM Server should be called by a C++ client...

C# COM Server should be called by a C++ client...

Scheduled Pinned Locked Moved COM
comhelpquestioncsharpc++
3 Posts 2 Posters 10 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.
  • J Offline
    J Offline
    Juergen_80
    wrote on last edited by
    #1

    Hi all, I'm absolutely no expert with COM but I have a (maybe very easy) question to you. I have a .dll file and would like to call some functions out of that. So I've created now a .tlb file out of the .dll with the command: regasm XYZ.dll /tlb This worked great and now I could also create the .tlh file out of this .tlb If I add this line in my C++ code: #import "XYZ.tlb" named_guids raw_interfaces_only and recompile the project. That all worked great right now. But now I have the problem how I must call this part in my code to use the functions out of this .dll file? I know that it should work with the CoCreateInstance(...) function but I don't know what parameters I must set there exactly? Maybe I could send to someone my little example and he could help me? I thinks this should be no problem for an expert? In this forum it's not possible to add a little attachment :-(. Thanks for any help!!! Regards, Jürgen

    L 1 Reply Last reply
    0
    • J Juergen_80

      Hi all, I'm absolutely no expert with COM but I have a (maybe very easy) question to you. I have a .dll file and would like to call some functions out of that. So I've created now a .tlb file out of the .dll with the command: regasm XYZ.dll /tlb This worked great and now I could also create the .tlh file out of this .tlb If I add this line in my C++ code: #import "XYZ.tlb" named_guids raw_interfaces_only and recompile the project. That all worked great right now. But now I have the problem how I must call this part in my code to use the functions out of this .dll file? I know that it should work with the CoCreateInstance(...) function but I don't know what parameters I must set there exactly? Maybe I could send to someone my little example and he could help me? I thinks this should be no problem for an expert? In this forum it's not possible to add a little attachment :-(. Thanks for any help!!! Regards, Jürgen

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This may help: Introduction to COM - What It Is and How to Use It[^].

      J 1 Reply Last reply
      0
      • L Lost User

        This may help: Introduction to COM - What It Is and How to Use It[^].

        J Offline
        J Offline
        Juergen_80
        wrote on last edited by
        #3

        Yes, I've read this page and it works also for another project. But this time I have another one and I don't know exactly how I can go on with this one :-(. Could you take a look at the project I have? Just a few minutes. That would be really great!!!

        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