Conclusion

[Previous] [Next]

ATL hides much of an object's internal architecture behind useful abstractions. These abstractions are rooted in the foundation classes described in this chapter. Critical-section and threading-model classes ensure that the object is thread-safe in the model you choose to support in the Object Wizard. CComObjectRoot classes utilize the threading classes and provide a basis for reference counting. CComObject classes derive from your object class and provide the entry point for IUnknown methods in aggregated and normal object instances. The COM map describes the interfaces for which your object supports QueryInterface by means of a series of macros. The COM map also describes how to access the interfaces. IDispatchImpl uses type information to implement IDispatch for an object with a dual interface. ATL uses a thunking mechanism to produce debug output for per-interface reference counting.

In this chapter, we focused on the details of ATL COM object implementation. In Chapter 7, we'll take a step back and examine the housings that contain COM objects, also known as servers. As we'll see, ATL handles much of the boilerplate code necessary to build a fully functional server.



Inside Atl
Inside ATL (Programming Languages/C)
ISBN: 1572318589
EAN: 2147483647
Year: 1998
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net