The ATL proxy generator generates proxies for interfaces defined in a type library. Otherwise, hand coding these proxies would be very tedious.
Use the proxy generator when you want to support a connection point or a smart pointer. The proxy generator creates a class that represents a particular interface and its methods. For a connection point, the proxy generator also writes the code needed to broadcast a method call to all connected sinks.
For a connection point proxy, the class created derives from IConnectionPointImpl and each method enumerates the connections (making calls on each one) inside a critical section.
For a smart pointer proxy, the class derives from CComPtr. Each method simply calls through to the underlying interface. When the target interface is a dispinterface, the methods automatically call Invoke.
The proxy generator generates the class derived from IConnectionPointImpl or from CComPtr by reading the type library and implementing a function for each method. Before you can use the proxy generator, you must generate the type library. To do this, either build your project or right click on the .idl file in FileView. On the submenu that appears, click Compile ThisProj.idl where ThisProj will be the name of your project.
For more information about using the ATL Proxy Generator, see the ATL Tutorial.
See Also Connection Points