Exchange Client Extensions and Duet

Exchange Client Extensions are used in Outlook to extend the functionality of Outlook.  A developer can add buttons to a toolbar or things like that to do additional operations in Outlook.  However, the recommended way to extend the functionality of Outlook is to use a COM Add-in.  If you are a developer and can’t implement your functionality as a COM Add-in, voice your opinion here

Duet is implemented as a COM Add-in in Outlook and other Office applications.  Because Duet performs some operations on messages, there can be undesirable results when an Exchange Client Extension (ECE) is loaded.  One such error that a user may run into is the following pop-up error when selecting a large number of email items and copying them:

The Add-in "SAP Calendar" (C:\Program Files\SAP\FrontEnd\SapGui\wdkcalex.dll) cannot be loaded and has been disabled by Outlook. Please Contact the Add-in manufacturer for an update. If no update is avilable, please uninstall the Add-in. Out of memory or system resources. Close some windows or programs and try again.

This error is not clearly explaining what the *real* problem is.  In this case, what is happening is that when you copy the messages, Duet is opening each item and that is causing Outlook’s code to invoke the ECE to perform it’s operations on the message.  Because the ECE may add a toolbar or a button to the message, this will allocate memory from the Desktop Heap.  The Desktop Heap is a limited resource and can be increased in size, but ultimately you still have a limitation.  In this case, we recommend that you disable any Exchange Client Extensions when running Duet.  If you require the functionality of the ECE, check with the ECE vendor and see if they have a COM Add-in with the same functionality.

How do you know if you are running into this exact issue?

This error above can be triggered for other error conditions also.  We have a tool that you can run to examine the desktop heap called Desktop Heap Monitor.  After installing it and running it the output should look something like this:

Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
-------------------------------------------------------------
Session ID: 0 Total Desktop: ( 5312 KB - 7 desktops)

  WinStation\Desktop Heap Size(KB) Used Rate(%)
-------------------------------------------------------------
WinSta0\Default 3072 11.7
WinSta0\Disconnect 64 4.5
WinSta0\Winlogon 128 9.9
Service-0x0-3e7$\Default 512 14.7
Service-0x0-3e4$\Default 512 8.1
Service-0x0-3e5$\Default 512 4.3
SAWinSta\SADesktop 512 0.5
-------------------------------------------------------------

The output above shows that I have a 3072 KB of Desktop heap, and 11.7% is in use.  Now, if I go to Outlook and cause the error to occur by selecting a large number of messages and copying them, I can run the tool again with the dialog up and see the following:

Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
-------------------------------------------------------------
Session ID: 0 Total Desktop: ( 5312 KB - 7 desktops)

  WinStation\Desktop Heap Size(KB) Used Rate(%)
-------------------------------------------------------------
WinSta0\Default 3072 99.9
WinSta0\Disconnect 64 4.5
WinSta0\Winlogon 128 9.9
Service-0x0-3e7$\Default 512 14.6
Service-0x0-3e4$\Default 512 8.1
Service-0x0-3e5$\Default 512 4.3
SAWinSta\SADesktop 512 0.5
-------------------------------------------------------------

Now you can see that 99.9% of the desktop heap is used.  In this state, you can’t launch a new application either.  That is because there is no memory available to create windows or toolbars or buttons, etc.

If you get the above error, and you still have plenty of desktop heap, then you may be running into the ECE having a different problem.

Note:  The above data was collected from a machine running Windows XP.  Desktop Heap Monitor does not work on Vista or Windows Server 2008.  In Vista, the default Desktop Heap size has been increased but the problem can still occur.  If you need help with this on Vista call Microsoft Customer Support to get assistance.