In the midst of all this publicity writing ATL-based applications, you will
find little in the way of documentation on porting your legacy Win32 applications to
ATL. Hopefully, these steps will ease that migration path.
Include AtlBase.h file in StdAfx.h after AfxWin.h. This is to take advantage to
declare a variable for CComModule. Because AtlWin.h file needs, _Module as variable
We have to keep extern because we are originally declaring variable in
Application main file.
extern CComModule _Module;
Then include the remaining files which helps for an ATL Application. In the insert Object of ATL uses ATLHost.h which needs to compile atlcom.h as before.
In the StdAfx.cpp, Include AtlImpl.cpp file.
In the main Application file, add the following
//originally declaring the CComModule variable
Then, Add the following two lines, which are required to activate ATL
Object Wizard, when you choose Insert ATLObject from Insert Menu.
Initialize the CComModule variable with ObjectMap and with the current
instance in the WinMain function
Add the <ProjectName>.idl file into the project and add the library related code:
If you want to insert a dialog and want to show. Follow the above steps and
declare the variable of ur dialog class and call DoModal with that variable
(don't forget to include dlg header file).
This code has been tested with and works fine with the Windows CE environment.
References and Acknowledgments
ATL Internals - Rector, Sells (My thanks to the Authors!)
On-demand Event Event Date: March 23, 2017
As you adopt the use of cloud services, whether in public/IaaS, SaaS or hybrid environments, the attack surface expands and, if breached, the costs increase exponentially.
This session is designed to help IT and security leaders understand and address the unique challenges that enterprises typically face when they deploy their applications in the public cloud. It summarizes the areas that the public cloud vendors typically take care of and highlights the areas …
Live Event Date: June 29, 2017 @ 1:00 p.m. ET / 10:00 a.m. PT
Security teams looking to extend their network perimeter defenses with an attack and breach detection capability are discovering that a hosted SIEM gets them up and running faster. IBM QRadar on Cloud is a market–leading, trusted solution that can be easily extended with apps and add–ons for user behavior analytics and cognitive security.
If you are still relying on basic log collection tools or an aging collection of security point …