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