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. COM using pure c++

COM using pure c++

Scheduled Pinned Locked Moved COM
helpcsharpc++visual-studiocom
4 Posts 2 Posters 14 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.
  • M Offline
    M Offline
    Member 9899644
    wrote on last edited by
    #1

    I make simple com exe server using win32 application, but when i used winconsole application it gives me error i.e com component can not be created, is there any change in settings of visual studio or in code. plz help me out.

    D 1 Reply Last reply
    0
    • M Member 9899644

      I make simple com exe server using win32 application, but when i used winconsole application it gives me error i.e com component can not be created, is there any change in settings of visual studio or in code. plz help me out.

      D Offline
      D Offline
      Derek Tortonian
      wrote on last edited by
      #2

      Hi, Member 9899644, Your post provides no real information about your simple com exe server. It is impossible to diagnose your problem. There are so many possibilities for error that I'm not even going to try to guess.

      M 1 Reply Last reply
      0
      • D Derek Tortonian

        Hi, Member 9899644, Your post provides no real information about your simple com exe server. It is impossible to diagnose your problem. There are so many possibilities for error that I'm not even going to try to guess.

        M Offline
        M Offline
        Member 9899644
        wrote on last edited by
        #3

        I am trying to build Simple COM Exe Server which provide single interface and interface has one method, when client called the Exe Server then using the command line parameter server guess that client is of regular(show window) client or COM(want interface pointer) client. If client is of COM client then method which is register Class Factory object is get called using CoRegisterClassObject() class factory object is registered and object of Concrete class is created and return the interface pointer. this all is done, but when i make COM Exe server usssing Console application (template in visual studio) then CoRegisterClassObject()is not create the concrete class object and not return interface pointer. Is there any changes when we create exe server as win32 application and console application.

        D 1 Reply Last reply
        0
        • M Member 9899644

          I am trying to build Simple COM Exe Server which provide single interface and interface has one method, when client called the Exe Server then using the command line parameter server guess that client is of regular(show window) client or COM(want interface pointer) client. If client is of COM client then method which is register Class Factory object is get called using CoRegisterClassObject() class factory object is registered and object of Concrete class is created and return the interface pointer. this all is done, but when i make COM Exe server usssing Console application (template in visual studio) then CoRegisterClassObject()is not create the concrete class object and not return interface pointer. Is there any changes when we create exe server as win32 application and console application.

          D Offline
          D Offline
          Derek Tortonian
          wrote on last edited by
          #4

          Member 9899644, Sorry for not replying to your post, I completely forgot about it. It sounds as though you are just learning about COM and it's associated functionality. This can be very difficult, because, typically, all you need to do is ignore one aspect of the creation and activation paradigm, and the whole thing just fails to operate as expected (and, you have no idea why). When I was first trying to understand COM (syntax and the reasons it was designed in such a way), I found that reading Don Box's book: Essential COM was extremely helpful. You need an overview, and you need to understand why COM does what it does, and, to read some example source code. As I recall, there are some excellent articles right here on the CodeProject about registering a COM server. Also, you don't mention how your COM client activates the object,...this is typically done with CoCreateInstance. This is an excellent introductory series to COM: The COM Macro-Architecture Topology, ...and,...COM Macro Architecture Topology - Servers, ...and,...COM Macro Architecture Topology - Clients, and,...COM IDs & Registry Keys in a Nutshell. ...Also, Michael Dunn has an excellent series on COM: Introduction to COM - What It Is and How to Use It., and,... Introduction to COM Part II - Behind the Scenes of a COM Server Several incredibly informative articles about COM are written by: Lim Bio Liong Understanding The COM Single-Threaded Apartment Part 1, ...and,...Understanding The COM Single-Threaded Apartment Part 2 Jeff Glatt als

          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