Determining Which Client Interfaces are Installed

The information that is added to the [Mail] section of the WIN.INI file or the system registry specifies the types of MAPI client application programming interfaces (APIs) that are installed on a computer. These types include Simple MAPI, MAPI, the Active Messaging Library, and CMC. If CMC is installed, another entry exists to identify the name of the CMC DLL that should be loaded for your system.

The entries that identify client API installations are as follows:

[Mail]
MAPI=0 or 1
MAPIX=0 or 1
OLEMessaging=0 or 1
CMC=0 or 1
 

Each entry that represents an installed MAPI client API is set to 1. If a particular client API is not installed, its entry either is missing from the WIN.INI file or the registry or is set to 0. The MAPI entry identifies a Simple MAPI installation, the MAPIX entry identifies the more complete MAPI installation with all of the object oriented interfaces and its related functions and macros, and the Active Messaging Library and CMC entries indicate the client API of the same name.

Computers with CMC installations can also set the CMCDLLNAME or CMCDLLNAME32 entries to specify the filename of the CMC DLL. CMCDLLNAME identifies the 16-bit version; CMCDLLNAME32 identifies the 32-bit version. If these entries are omitted and a CMC installation exists, MAPI searches for a file named CMC.DLL regardless of whether the installation is for a 16-bit or 32-bit platform. The format of the CMCDLLNAME entries is as follows:

CMCDLLNAME=full path to file
CMCDLLNAME32=full path to file
 

All of the types of MAPI installations reside in a standard DLL. Simple MAPI, CMC, and MAPI reside in MAPI.DLL for 16-bit platforms and MAPI32.DLL for 32-bit platforms. The Active Messaging Library resides in OLEMSG.DLL for 16-bit platforms and OLEMSG32.DLL for 32-bit platforms. Active Rendering resides in AMHTML.DLL.

Both 16-bit and 32-bit Simple MAPI client applications can run in an environment that supports both platforms (for example, the Windows 95 and Windows NT operating systems) if there is a Simple MAPI installation available for at least one of the platforms. Client applications do not need the name of the server executable file; information contained in the OLE registry automatically binds the appropriate file.

Microsoft supplies an import library for MAPI. Client applications can load the MAPI DLL statically using the import library or load it dynamically using the Windows API functions LoadLibrary and GetProcAddress.

There is no import library for either the Simple MAPI DLLs or the CMC DLLs. These DLLs must always be loaded dynamically by calling the Windows functions LoadLibrary and GetProcAddress. Applications that use these functions to load a CMC, Simple MAPI, or MAPI DLL should always check either the appropriate CMC, MAPI, or MAPIX entry to determine if the API is installed before attempting to load the DLL.

The specific version of MAPI is indicated by another string value, which is a four-part number as follows:

MAPIXVER=w.x.y.z