COM - The Short Explanation
Let's try to have a highly abstracted understanding on how COM works without using any jargons. First we build components following COM rules and put them into files (.dll or .exe). Then we register them so the information about them is stored in Windows registry. By now we have finished the component (or server) building job. To use certain functions, we need to know their unique ID's and the function description (or declaration) of each of them. We can get this information by checking the registry using some tools or use some files from the component vendors that store this information. Then we get the pointers of these functions by making calls to them following the COM rules. The Windows will take care of the rest of of the work such as locating the file storing the functions and load/unload them as needed. Now we can enjoy the functions just like using any conventional functions to get our tasks done.
Let's have a little bit clarification: A component is a group of functions. A .exe or .dll file is not component. They are just the means to store components. A file can have multiple components. Each component has an ID (CLSID) and each interface of a component also has an ID (IID). All the ID's are globally unique. In other worlds, no two functions or components in the world have the same ID. Each component can have more than one interface. Each interface is a group of functions.
thanks
