Developers Workshop to COM and ATL 3.0

 < Free Open Study > 


Objectives:

COM objects can be viewed as the worker grunts of an application. Clients create them and bombard them with requests, until they have deemed they are no longer necessary. In this chapter we investigate a number of ways in which a COM object can be given a voice of its own, allowing it to communicate with the client(s) making use of it. In other words, this chapter is about enabling bidirectional communications.

We begin by examining a simple (but non-standard) approach of establishing bidirectional communication using callback interfaces. Along the way, we will see how Visual Basic and C++ clients may create "sink" objects to listen to what a coclass has to say. From here, we move into the standard COM protocol for bidirectional communications: connectable objects. After seeing what happens under the hood using straight C++, we then make use of the various tools offered by ATL.


 < Free Open Study > 

Категории