To create a messaging application, you must setup your Visual Studio project by including the necessary messaging-related header files, and by configuring the linker to link-in the necessary messaging-related type library.
At the beginning of your C++ source file, you must add pre-processor directives to include the messaging header files. The following sample code shows you how this should look.
#include <mapix.h> #include <cemapi.h> #include <mapiutil.h> #include <mapidefs.h>
With you project loaded into Visual Studio, you must configure the Linker with the messaging type library dependency.To Specify the Type Library for the Linker
In Visual Studio, click the Project menu, and then click Properties (or just press Alt+F7).
In the Project Property Pages dialog box, navigate down the hierarchy tree and click the following property page:
Configuration Properties > Linker > Input.
In the Additional Dependencies field on the right, type the name of the CEMAPI type library file:
It is assumed that you are developing your application in Visual Studio 2005 or 2008, and that you have already installed one of the Windows Mobile SDKs.