Click here to Skip to main content
15,897,315 members
Articles / Mobile Apps / Windows Mobile

RAPI2: The Friend You Never Knew You Had

Rate me:
Please Sign up or sign in to vote.
4.74/5 (13 votes)
17 May 2010CPOL7 min read 41.5K   367   23  
Using the RAPI2 interface safely and effectively.
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#pragma warning( push )
// disable all of the "warning C4201: nonstandard extension used : 
// nameless struct/union" warnings from old windows headers.
#pragma warning( disable : 4201 )

// NOTE - this value is not strongly correlated to the Windows CE OS version being targeted
#define WINVER _WIN32_WCE

// Change this value to use different versions
#define _WIN32_WCE_AYGSHELL 1
#define _SECURE_ATL 1
#define _WTL_CE_NO_ZOOMSCROLL

#define NOMINMAX
#include <algorithm>
using std::max;
using std::min;

#define _countof(_x) (sizeof(_x)/sizeof(_x[0]))

#include <ceconfig.h>

#ifdef _CE_DCOM
#define _ATL_APARTMENT_THREADED
#endif

#include <windows.h>
#include <altcecrt.h>
#pragma warning( pop )

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 Code Project Open License (CPOL)


Written By
Software Developer (Senior) An engineering firm in Cedar Rapids, Iowa
United States United States
I'm also on the MSDN forums
http://social.msdn.microsoft.com/profile/paulh79

Comments and Discussions