Building Sample Applications in the Visual C++ Development Environment
The sample code that ships with the Microsoft Exchange Server SDK compiles into three types of programs:
-
Console applications
-
Windows applications
-
DLLs
Note The SDK also provides static link libraries in directories under the \LibSrc directory. These libraries are not intended to be altered.
To build a sample application from within Visual C++, follow these steps:
To build a sample application or DLL
-
Create a top-level project for the sample application:
-
Add the application's .C, .CPP, .RC, and .DEF files to the project:
-
Choose the Files into Project option from the Insert menu.
-
Select the appropriate files from the File Name list box in the Insert Files into Project dialog box, and click OK.
-
Make sure to insert only one file each of the type .RC or the type .DEF. For example, if an application's directory contains two .RC files (such as \PROXYGEN\EDKPROXY.RC and \PROXYGEN\PROXYVER.RC), do not include the version resource file (PROXYVER.RC).
-
If the application's directory contains an .MC (message compiler) file, create a subproject for it and associate an external makefile with it. See Creating a Message-Compiler Subproject.
-
Select the correct set of libraries for the linker:
You can also choose the EXCHSDKD.LIB debug version instead of EXCHSDK.LIB, but first verify that this library has been built. See Building the Set of Sample Applications and Using the ExchSDKd Library.
-
Click the C/C++ tab. In the text box Preprocessor definitions, append the following to the existing definitions list:
_MT,_DLL,_WIN32,WINVER=0X0400
-
Click OK. You can now build the sample application.