Developers are lazy and prefer things that are easy to handle, and ATL was designed to facilitate COM development.
In most cases, ATL takes care of the many messy details of COM development, such as managing QueryInterface, reference counting, and lifecycle management, as well as all the various stream models supported by COM. It also provides built-in support for things like dual interfaces, connection points, counters, etc.
If you do not use ATL or something like this, you will write a lot more code. That would be unsuccessful;)
Edit:
I am not going to write COM code without ATL for an example because it is so terrible, but check this:
http://www.codeproject.com/KB/COM/simplecomserver.aspx
Download this and then view the following files in your simplecomserver project:
registry.cpp
simplecomserverImpl.cpp
(about 700 lines of code)
Now imagine that instead of writing all this monster, you can get a class from CCoComClass and simply implement the Name method, and then do this to process and register an instance of the class:
Gerald
source share