Build setup

Sep 10, 2010 at 9:48 AM
Edited Sep 10, 2010 at 9:49 AM

Hi folks,

I like to write a plugin for a tool to modify the Exchange Server ACLs. I saw the code I can use to and I also found this tutorial (http://support.microsoft.com/KB/297493). My problem and question is: What setup do I need on my build machine? I have a Server 2k3 standard edition and an Exchange server. I have a Visual C++ Express and a Windows SDK (named 7.0A) and a Windows Server 2003 SP1 SDK installed. I included the exchange headers from your include folder and got this errors:

 

Library "build\temp.win32-2.6\Release\com/win32comext/mapi/src\mapi.lib" and Object 
"build\temp.win32-2.6\Release\com/win32comext/mapi/src\mapi.exp" was 
created.PyIMAPIProp.obj : error LNK2001: Unresolved external
 symbol "_IID_IExchangeModifyTable".build\lib.win32-2.6\win32comext/mapi\mapi.pyd :
 fatal error LNK1120: 1 Unresolved external Reference.error: 
command '"C:\Programme\Microsoft Visual Studio 10.0\VC\BIN\link.exe"' failed with exit status 1120

 

(Translated from german to english)

After some websearch I found the hint, that I need some outdated library files (MSDN tutorial says edkutils.lib and exchsdk.lib) which are not included in the actual SDKs. But the MFCMAPI has to be build with this libs too, so how do you build it? And could you give me a hint where I can get the necessary files/tools/sdks

Thanks in advance

- Marquies

Coordinator
Sep 10, 2010 at 3:20 PM

You don't want to link to those libs, and that wouldn't solve your problem either. IID_IExchangeModifyTable is a guid, and should be treated like every other guid - you need to use initguid in a cpp file to switch it from a declaration to a definition.

Put this in one (and only one) of your CPP files (you'll see this in guids.cpp in the MFCMAPI code):

#include <initguid.h>

#ifdef EDKGUID_INCLUDED
#undef EDKGUID_INCLUDED
#endif
#include <EDKGUID.H>

If you're still confused, research and read up on initguid.h.

Sep 13, 2010 at 2:47 PM

It works as described. Thx a lot.