[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 847
  • Last Modified:


Thic question doesn't quite belong here, but I belive I'll find answer(s).
I'm starting with COM programming and a little bit confused with few, probably basic things.
I develop application which receives (and sends) data via serial port and have to distribute it over network. My idea is to do this with a single COM EXE server which colects data and send it to the applications on a different machines. Application can have blocked thread listening and waiting data to come.

1. What is the difference between COM and DCOM network communication?
2. What I need to let all the different machines know about existance od EXE server (both COM and DCOM)? In other words, how to register them?
3. How COM/DCOM components are distributed to the other developers who want to use their services? Is it neccessary to include .h and .c files, all there is another way?
4. Is there smething else important for the begining? :)

Thank you very much,


P.S. My last 53 points. :)
1 Solution
Tommy HuiEngineerCommented:
COM's network communication model is DCOM (Distributed COM).

When you build a COM server, you typically need to use an .IDL file. The IDL file is used to create a proxy/stub DLL and the type library. You need to register the proxy DLL on the client machines so that they can communicate with the server. You typically would use the proxy or type library to get the interfaces. You typically don't need the .h or any .c files.

I would recommend you take a look at Professional DCOM Application Development by Jonathan Pinnock ISBN: 1-861001-31-2 for real examples of how to create DCOM servers.
1. To be simple DCOM is "COM with long wire". DCOM is an extension of COM for network communication.

2.COM components are made visible by registering its GUID in the windows registry. In a network there are many ways to let the machines know about ur component. It will be easy if U have DCOM95 installed in your system. It comes with Windows 98. Or else what can U do is import the registry file of the component into the windows system registry of the maxchines. If Ur EXE is a self registering EXE then the work is easy. Its enough if U run the EXE on the machines U want to make visble the component. It will register itself with a link to the server machine where the component resides.

3.The components can be installed on the machines just by registering the component DLLs in that system. There is no absolute necessity of providing .h files etc..) If it is such case the whole concept of COM would get violated.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now