Platform SDK: Exchange Server

Building the Exchange Libraries

Once you have configured your Visual Studio environment, and have installed and configured the Platform SDK core build environment, you can proceed to compile and build the Exchange libraries. These libraries provide access to functions useful when developing MAPI C++ applications for Exchange.

The source code for the libraries comes with the Database and Messaging component of the Platform SDK, and can be found in the directory [c:\mssdk]\Samples\DbMsg\Exchange\libsrc (Substitute your root SDK install path for the path in brackets above).

Each part of the library is contained in a separate directory below the one listed. In each directory you will find the source code and its corresponding Visual Studio project file (.dsp). Additionally, in the directory labeled exchsdk you can find both a project and a workspace file (exchsdk.dsw) that can be used to manage and compile all the separate parts of the library, as well as an additional top-level library called Exchsdk.lib (debug version is Exchsdkd.lib). This library is a composite of all the others and provides a single file to link the entire Exchange library into a project.

Note  Many of the samples link directly to the Exchsdk.lib (debug version is Exchsdkd.lib) library. If you intend to compile the C++ samples, it is required that you build the library . After you built it, you need only link against this file.

Setting the Active Configuration (Release or Debug)

Before actually compiling and linking the libraries, set the Active Configuration to either Win32 Release of Win32 Debug. The default configuration for the library projects is Win32 Release.

To Compile and Link the Exchange Library

  1. Make sure the %BkOffice% environmental variable is set in your environment. This variable is set by the Platform SDK installation and should point to the Platform SDK lib directory, normally c:\mssdk\lib. Each library part has a post-build step that copies the compiled DLL or LIB file to this location so that it is available in your path to be linked.
  2. Open the workspace file exchsdk.dsw in Visual Studio. If you installed the Platform SDK in the directory c:\MSSDK then this file would be located at C:\MSSDK\Samples\DBMSG\Exchange\ExchSdk\exchsdk\exchsdk.dsw. You should now have the full workspace loaded and a list of projects in the workspace panel on the left. Select ClassView. You should now see a list of projects. Each of these entries is a separate project located in a library directory with the same name.
  3. Select the Exchsdk classes project. Select the Set As Active Project option. The Exchsdk classes project should now be bold.
  4. Choose the Active Configuration, either Win32 Release or Win32 Debug.
  5. Select Build->Build Exchsdk.lib (F7) to start the build process.