Based on the previous trio of DCOM articles that appeared in DevJournal, you can see that it is extremely easy to create COM clients and servers. Just a handful of lines on both the client and server sides yields a complete COM application. You can now see why many developers use COM whenever they want to create a DLL – it only takes about 5 minutes to set up an in-process COM DLL and get it working.
The purpose of this article is to discuss how you might create your own COM servers and use them in real applications you create. As you will recall, the client code previously presented was a bit sparse. We will examine the standard steps you will take to create any server, and then look at the code you need to embed in any client to activate the server properly.