Click here to Skip to main content
15,884,099 members
Articles / Web Development / HTML

A Comprehensive CE Class Library to Replace ATL and MFC

Rate me:
Please Sign up or sign in to vote.
4.48/5 (14 votes)
4 Oct 2000CPOL 278.3K   998   70  
A collection of classes for CE that do not use ATL or MFC, plus an FTP client, database viewer, and sample application that solves beam deflection equations.
#ifndef __CePlatform_h__
#define __CePlatform_h__

#if defined(_WIN32_WCE)
	#pragma comment(lib, "coredll.lib")
	#pragma comment(lib, "commctrl.lib")
	#pragma comment(lib, "uuid.lib")

	#if defined(_WIN32_WCE_EMULATION)

		#if (_WIN32_WCE >= 211)
			#pragma comment(lib, "ole32.lib")
			#define CEPLAT_WCE_OLEAUT32_LIB "oleaut32.lib"
			#define CEPLAT_WCE_OLEAUT32_DLL "oleaut32.dll"
		#elif (_WIN32_WCE <= 201)
			#define CEPLAT_WCE_OLEAUT32_LIB "oleautm.lib"
			#define CEPLAT_WCE_OLEAUT32_DLL "oleautm.dll"
			#pragma comment(lib, "ole32m.lib")
		#endif

	#else

		#pragma comment(lib, "ole32.lib")
		#define CEPLAT_WCE_OLEAUT32_LIB "oleaut32.lib"
		#define CEPLAT_WCE_OLEAUT32_DLL "oleaut32.dll"

	#endif // _WIN32_WCE_EMULATION

	#if (_WIN32_WCE >= 201)

		#pragma comment(lib, "corelibc.lib")

		#pragma comment(linker, "/nodefaultlib:libc.lib")
		#pragma comment(linker, "/nodefaultlib:libcd.lib")
		#pragma comment(linker, "/nodefaultlib:libcmt.lib")
		#pragma comment(linker, "/nodefaultlib:libcmtd.lib")
		#pragma comment(linker, "/nodefaultlib:oldnames.lib")

	#else // _WIN32_WCE < 201
		#if defined(_DEBUG)
			#pragma comment(lib, "libcmtd.lib")

			#pragma comment(linker, "/nodefaultlib:libc.lib")
			#pragma comment(linker, "/nodefaultlib:libcd.lib")
			#pragma comment(linker, "/nodefaultlib:libcmt.lib")
			//#pragma comment(linker, "/nodefaultlib:libcmtd.lib")
			#pragma comment(linker, "/nodefaultlib:oldnames.lib")

			#pragma comment(linker, "/nodefaultlib:corelibc.lib")

		#else

			#pragma comment(lib, "libc.lib")

			//#pragma comment(linker, "/nodefaultlib:libc.lib")
			#pragma comment(linker, "/nodefaultlib:libcd.lib")
			#pragma comment(linker, "/nodefaultlib:libcmt.lib")
			#pragma comment(linker, "/nodefaultlib:libcmtd.lib")
			#pragma comment(linker, "/nodefaultlib:oldnames.lib")

			#pragma comment(linker, "/nodefaultlib:corelibc.lib")

		#endif

	#endif // _WIN32_WCE > 201

	#if defined(_WIN32_WCE_PSPC)
		#include <aygshell.h>
		#pragma comment(lib, "aygshell.lib")
	#endif

	#pragma comment(lib, CEPLAT_WCE_OLEAUT32_LIB)

#else                            // Win32

	#pragma comment(lib, "kernel32.lib")
	#pragma comment(lib, "user32.lib")
	#pragma comment(lib, "olepro32.lib")
	#pragma comment(lib, "advapi32.lib")
	#pragma comment(lib, "ole32.lib")
	#pragma comment(lib, "oleaut32.lib")
	#pragma comment(lib, "uuid.lib")

#endif // !_WIN32_WCE


// Uncomment if you have problems building for a specific version, or you just want to
// make sure all the flags you expect are set
/*
#if defined(_DEBUG)
	#pragma message( "Compiling for Debug" )
#else
	#pragma message( "Compiling for Release" )
#endif

#if defined(_WIN32_WCE)
	#if (_WIN32_WCE == 200)
		#pragma message( "Compiling for CE version 2.00" )
	#elif (_WIN32_WCE == 201)
		#pragma message( "Compiling for CE version 2.01" )
	#elif (_WIN32_WCE == 210)
		#pragma message( "Compiling for CE version 2.10" )
	#elif (_WIN32_WCE == 211)
		#pragma message( "Compiling for CE version 2.11" )
	#else
		#pragma message( "Compiling for CE version ?.??" )
	#endif

	#if defined(_WIN32_WCE_EMULATION)
		#pragma message( "Compiling for Emulation" )
	#endif

	#if defined(_WIN32_WCE_PSPC)
		#pragma message( "Compiling for a Palm-sized PC" )
	#else
		#pragma message( "Compiling for a Handheld PC" )
	#endif
#endif
*/

#endif // __CePlatform_h__

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
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions