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 usage issue

COM usage issue

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialcomhelp
6 Posts 3 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.
  • F Offline
    F Offline
    Fedrer
    wrote on last edited by
    #1

    Hello, I wanted to communicate from one app (exe) to another app (exe) so I implemented COM interface in first application. There are only .idl and some auto generated files (xxx.h & xxx.c) in first app but I dont know how to use this interface in another application. Please guide.

    L 1 Reply Last reply
    0
    • F Fedrer

      Hello, I wanted to communicate from one app (exe) to another app (exe) so I implemented COM interface in first application. There are only .idl and some auto generated files (xxx.h & xxx.c) in first app but I dont know how to use this interface in another application. Please guide.

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

      See COM in plain C[^] and Introduction to COM - What It Is and How to Use It.[^].

      F 1 Reply Last reply
      0
      • L Lost User

        See COM in plain C[^] and Introduction to COM - What It Is and How to Use It.[^].

        F Offline
        F Offline
        Fedrer
        wrote on last edited by
        #3

        Thanks for link. Actually I am aware about the usage of COM but now problem is something different. How to use COM interface defined in my first application which is an executable. It does not produce any dll or lib. I need to give some reference to my second application to access same COM interface.

        L 1 Reply Last reply
        0
        • F Fedrer

          Thanks for link. Actually I am aware about the usage of COM but now problem is something different. How to use COM interface defined in my first application which is an executable. It does not produce any dll or lib. I need to give some reference to my second application to access same COM interface.

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

          If you read those articles they explain how to link a COM client to the server.

          F 1 Reply Last reply
          0
          • L Lost User

            If you read those articles they explain how to link a COM client to the server.

            F Offline
            F Offline
            Fedrer
            wrote on last edited by
            #5

            Thanks, Actually I got it. In my case it is .tlb file which I need to use to instantiate interface. Now one more problem came :) COCreateInstance() is returning REGDB_E_CLASSNOTREG Class not registered. Do I need to register tlb file like a com dll? If yes then how can do so?

            C 1 Reply Last reply
            0
            • F Fedrer

              Thanks, Actually I got it. In my case it is .tlb file which I need to use to instantiate interface. Now one more problem came :) COCreateInstance() is returning REGDB_E_CLASSNOTREG Class not registered. Do I need to register tlb file like a com dll? If yes then how can do so?

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              Fedrer wrote:

              Do I need to register tlb file like a com dll?

              You cannot register a TLB file. However you have to register the COM component (that is the DLL).

              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