Click here to Skip to main content
15,885,122 members
Articles / Desktop Programming / WTL

.NET Asynchronous Design Pattern for Native C++

Rate me:
Please Sign up or sign in to vote.
4.94/5 (15 votes)
2 Nov 2010GPL318 min read 43.6K   770   55  
Native C++ implementation of the .NET Asynchronous Design Pattern using Windows I/O Completion Ports
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#pragma once

// Change these values to use different versions
#define WINVER		0x0500
#define _WIN32_WINNT	0x0501
#define _WIN32_IE	0x0501
#define _RICHEDIT_VER	0x0200

#include <atlbase.h>
#define _WTL_NO_CSTRING
#include <atlstr.h>
#include <atlapp.h>

extern CAppModule _Module;

#include <atlwin.h>

#if defined _M_IX86
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Systems / Hardware Administrator
Canada Canada
Daniel has been coding on and off using C and C++ for over 10 years and has recently gained more interest towards .NET and managed languages such as C# and C++/CLI. He is currently working full-time at PricewaterhouseCoopers as a senior support specialist developing in-house software solutions during his spare time. He is also currently studying part time at the University of Quebec in Montreal (UQAM) to obtain his bachelor's degree in software engineering.

Comments and Discussions