Download ATL Internals: Working with ATL 8 by Christopher Tavares, Kirk Fertitta, Brent E. Rector, Chris PDF

By Christopher Tavares, Kirk Fertitta, Brent E. Rector, Chris Sells

The lively Template Library (ATL) is a collection of small, effective, and versatile sessions created through Microsoft that facilitate the construction of interoperable parts for constructing home windows purposes. the newest model of ATL is model eight, published with visible Studio 2005. whereas .NET has been getting the entire realization lately, there's nonetheless a massive base of put in COM/ATL code. Many programmers are facing tough concerns including new .NET code to that put in base. while there are lots of situations the place ATL remains to be the very best selection for brand spanking new functions - functions that experience to run speedy and successfully on home windows, the place the CPU does not have the reminiscence or bandwidth to run .NET. This ebook might be a godsend to builders in either one of these occasions. As one tech reviewer positioned it, "Any programmer wanting to transition ATL code to .NET will desire this book." the 1st variation used to be extensively praised, and bought on the subject of 20,000 devices. whereas ATL isn't any longer the leading edge of Microsoft developer instruments, there may still be a robust marketplace for authoritative, entire, deep assurance of the latest model of this general device.

Show description

Read or Download ATL Internals: Working with ATL 8 PDF

Similar nonfiction_1 books

Men on Strike: Why Men Are Boycotting Marriage, Fatherhood, and the American Dream - and Why It Matters

American society has develop into anti-male. males are sensing the backlash and are consciously and unconsciously going “on strike. ” they're falling by the wayside of school, leaving the crew and warding off marriage and fatherhood at alarming charges. the fad is so reported variety of books were written approximately this “man-child” phenomenon, concluding that males have taken a holiday from accountability just because they could.

Elliptic Boundary Value Problems of Second Order in Piecewise Smooth Domains

The e-book incorporates a systematic remedy of the qualitative conception of elliptic boundary price difficulties for linear and quasilinear moment order equations in non-smooth domain names. The authors be aware of the next primary effects: sharp estimates for powerful and vulnerable ideas, solvability of the boundary worth difficulties, regularity assertions for recommendations close to singular issues.

Field Based Coordination For Pervasive Multiagent Systems Dec

Increasingly more, software program structures contain self reliant and dispensed software program elements that experience to execute and engage in open and dynamic environments, resembling in pervasive, self sufficient, and cellular functions. the necessities with recognize to dynamics, openness, scalability, and decentralization demand new techniques to software program layout and improvement, able to assisting spontaneous configuration, tolerating partial mess ups, or arranging adaptive reorganization of the total procedure.

Additional info for ATL Internals: Working with ATL 8

Example text

Results of the ATL Simple Object Wizard After you specify the options, the Simple Object Wizard generates the skeleton files for you to start adding your implementation. RGS file containing [4] registration information. In addition, the IDL file is updated to contain the new interface definition. [4] See Chapters 4 and 5 for more information on COM class registration. com to register it. Thanks. public: CCalcPi() { } DECLARE_REGISTRY_RESOURCEID(IDR_CALCPI) BEGIN_COM_MAP(CCalcPi) COM_INTERFACE_ENTRY(ICalcPi) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo) COM_INTERFACE_ENTRY(IConnectionPointContainer) END_COM_MAP() BEGIN_CONNECTION_POINT_MAP(CCalcPi) CONNECTION_POINT_ENTRY(__uuidof(_ICalcPiEvents)) END_CONNECTION_POINT_MAP() // ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: }; OBJECT_ENTRY_AUTO(__uuidof(CalcPi), CCalcPi) The first thing to notice is the list of base classes.

It. Thanks Adding Persistence ATL provides base classes for objects that want to be persistentthat is, saved to some persistence medium (such as a disk) and restored later. COM objects expose this support by implementing one of the COM persistence interfaces, such as IPersistStreamInit, IPersistStorage, or IPersistPropertyBag. ATL provides implementation of these three persistence interfacesnamely, IPersistStreamInitImpl, IPersistStorageImpl, and IPersistPropertyBagImpl. Your COM object supports persistence by deriving from any of these base classes, adding the interface to your COM_MAP, and adding a data member calledm_bRequiresSave that each of these base classes expects.

Thanks Implementing Additional Interfaces Interfaces are the core of COM, and most COM objects implement more than one. Even the wizard-generated ATL Simple Object, shown earlier, implements four interfaces (one custom interface and three standard interfaces). If you want your ATL-based COM class to implement another interface, you must first have a definition of it. For example, you can add the following interface definition to your project's IDL file: [ object, uuid("27ABEF5D-654F-4D85-81C7-CC3F06AC5693"), helpstring("IAdvertiseMyself Interface"), pointer_default(unique) ] interface IAdvertiseMyself : IUnknown { [helpstring("method ShowAd")] HRESULT ShowAd(BSTR bstrClient); }; To implement this interface in your project, you simply add the new interface to your C++ class inheritance list and add the interface to the COM_MAP: class ATL_NO_VTABLE CCalcPi : public ICalcPi, public IAdvertiseMyself { BEGIN_COM_MAP(CCalcPi) COM_INTERFACE_ENTRY(ICalcPi) COM_INTERFACE_ENTRY(IAdvertiseMyself) ...

Download PDF sample

Rated 4.08 of 5 – based on 38 votes