C++ MAPI - Configuring EDK (Exchange Development Kit)

CoderSource.net
C++ MAPI - Configuring EDK (Exchange Development Kit)
Rating:

Date: 5/1/2004 12:00:00 AM

  • In the directory where the C++ MAPI Exchange kit has been installed, go to $ExchangeSDK\LibSrc\ExchSdk\Release and build the debug versions of the ExchangeSDKd.lib. This library when recompiled will have the proper version of MFC without any problems after recompilation for configuring C++ MAPI EDK.
  • The ExchangeSDKd.lib is nothing but a compounded version of all the other libraries put together in the $ExchangeSDK\LibSrc folder. There is one Makefile in this directory, which can be used for building this library. But the MakeFile has to be tinkered a little bit, for making C++ MAPI EDK work in the system.
  • The source code has to be compiled separately either using the make file in the individual projects or by using the VC++ IDE. Thus the C++ MAPI library files has to be generated in the order like AcctCrt.lib, Acl.lib, AddrLkup.lib ... till Winwrap.lib.
  • The following make file can be used, instead of the one from the C++ MAPI EDK. This has been modified a little bit and made to work for my system.


      #!include <disable.mak>

      #----------------------------------------------------------------------------
      #
      # Description:
      # Make File to assemble the libraries for the C++ MAPI EDK
      #
      # Copyright (C) Microsoft Corp. 1986-1998. All Rights Reserved.
      #
      #----------------------------------------------------------------------------

      USE_ExchANGE = 1

      Proj = ExchSDK

      !include <BkOffice.Mak>

      LibList=\
      ..\EXAdmin\Release\EXAdmin.Lib \
      ..\AddrLkup\Release\AddrLkup.Lib \
      ..\EDKCfg\Release\EDKCfg.Lib \
      ..\EDKDebug\Release\EDKDebug.Lib \
      ..\EDKEvent\Release\EDKEvent.Lib \
      ..\EDKGUID\Release\EDKGUID.Lib \
      ..\EDKMAPI\Release\EDKMAPI.Lib \
      ..\EDKMsg\Release\EDKMsg.Lib \
      ..\EDKTrack\Release\EDKTrack.Lib \
      ..\EDKUtils\Release\EDKUtils.Lib \
      ..\ExchInst\Release\ExchInst.Lib \
      ..\GWMain\Release\GWMain.Lib \
      ..\GWReport\Release\GWReport.Lib \
      ..\MBLogon\Release\MBLogon.Lib \
      ..\MesgXlat\Release\MesgXlat.Lib \
      ..\Monitor\Release\Monitor.Lib \
      ..\NewPst\Release\NewPst.Lib \
      ..\Stats\Release\Stats.Lib \
      ..\WinWrap\Release\WinWrap.Lib \
      ..\GWPerf\Release\GWPerf.Lib

      NBLibList = \
      DAPI.Lib \
      RtfLIB32.Lib \
      SADAPI.Lib \
      MAPI32.Lib
      DMAPIW32.Lib

# C++ MAPI EDK - If any of the above compilations doesn't work, just comment the code by placing a "#" in front of the line

      all: Release\ExchSDK$(DbgLibFlag).Lib

      Release\ExchSDK$(DbgLibFlag).Lib: $(LibList)
      $(MkDest)
      $(LIBU) $(LIBFLAGS) $(LibList) $(NBLibList) $(LogCmd)
      set copycmd=/y
      XCopy "$@" "$(LibDir)" $(LogCmd)


   If some one does not know how to use MakeFile, it is nothing but calling nmake.exe in the folder where this MakeFile and the requried source files are present. This will build the required library files for C++ MAPI EDK programming.

  • This makefile will generate a ExchangeSDKd.lib library, which can be used from now on. But with this, include the following header file in the project to avoid some more linking problems.

     // GWMain.h
     // Add this file to resolve the linker errors while generating the required C++ MAPI EDK libraries.

     extern "C" void GWMain(void)
     {
          return;
     }


     // HrGWLogon
     extern "C" HRESULT HrGWLogon(void)
     {
         return MAPI_E_CALL_FAILED;
     }


     // HrGWLogoff
    extern "C" HRESULT HrGWLogoff(void)
    {
        return MAPI_E_CALL_FAILED;
    }


  • Copy the library file to C:\Program Files\Microsoft Visual Studio\VC98\Lib. Keep a back-up of the old library in the same directory. This should set up the Exchange development environment properly. This will allow us to start working on MAPI projects now.

   If there is any need, users can Download the Exchange development kit from Microsoft for local installation.

You Can Rate this Article, if you are Logged In      
 

More Links from CoderSource.net:

 
Refer to a Friend:

Your Details:

Name:     e-mail:

Friend Details:

Name:    e-mail:    


MENU
Home
MFC 
C++
.Net
WIN32
Programming
Forum
My Articles
Add to Google
Add to My Yahoo!
Welcome to Codersource.Net Login | Register | Faq  

SEARCH
Google
 

NOTES:


Thanks for visiting our CoderSource.net. This site will be improved with more articles. Interested visitors can also submit their articles through the Submit Article link.Your article will also be published after due consideration by the editor. 

© Copyright 2003. All rights on content reserved by CoderSource.net. Contact    About Us