Link to home
Start Free TrialLog in
Avatar of singh_balinder
singh_balinder

asked on

COM / DCOM

Please suggest me a site where i can get information about the basics of COM/DCOM or if you yourself can tell me then that would be great to.
ASKER CERTIFIED SOLUTION
Avatar of 3rsrichard
3rsrichard

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ramaswamy_ravi
ramaswamy_ravi

Singh,

COM stands for Component Object Model.
They can be written in any language but the compiler needs to compile in a binary compatible format. This is because, it should run in any environment.

When this object is invoked, a system process gets the request and this loads this object and links this to the caller and the system process takes his hand off.

It should not depend on where the physical object is located, so the registration process comes. All COM objects are given a unique GUID across the systems. (I do not how this happens?). Each interface is given an id. The system process explained earlier, uses these to load the object and connect to the caller.

Why do we need COM objects. Earlier when DLLs were written in standard fashion all functions have an ordinal position. When we add a new function you might screw up the ordinal positions of the functions and this will make to you recompile all your programs which calls this DLL.

This problem is resolved in COM objects. Of course, you still have to recompile the calling programs should you change the name of the methods in the interface, add, change or delete the parameters in the function, change the return value.

You can avoid recompiling the calling programs, if you have only change to the body of the function. Set the Binary Compatible property. This will not change the GUID and Interface ID.

Hope this helps. Please let me know, should you need more assistance in this.

Cheers,
Ravi