XADM: Access Violation When You Move a Mailbox Programmatically by Using Cdoexm.dll (296862)



The information in this article applies to:

  • Microsoft Exchange 2000 Server

This article was previously published under Q296862

SYMPTOMS

If you move a mailbox programmatically by using the move mailbox method in Exchange 2000, an access violation may occur in the application that calls the move mailbox method.

CAUSE

This problem occurs because Cdoexm.dll loads Mapi32.dll explicitly from the Exchsrvr\Bin folder, to avoid conflict with the Mapi32.dll file that is included with Outlook. However, if the application calls the MAPIInitialize function, Mapi32.dll is loaded from the Winnt\System32 folder. Because of this, two Mapi32.dll files are loaded in the application address space, which causes the access violation.

RESOLUTION

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft Exchange 2000 Server service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:

Component: Move Mailbox

File nameVersion
Cdoexm.dll6.0.4418.98

STATUS

Microsoft has confirmed that this is a problem in Microsoft Exchange 2000 Server.

MORE INFORMATION

The following information from the Microsoft Developer Network (MSDN) describes how to explicitly map Messaging Application Programming Interface (MAPI) calls to MAPI DLLs:

Explicitly Mapping MAPI Calls to MAPI DLLs

In some cases, MAPI calls made from a particular DLL or executable file need to be routed to the system MAPI DLL (called Mapi32x.dll) or another custom MAPI DLL even though the default mail client supports the call. Such DLLs or executables files can be listed as string registry values in the HKLM\Software\Microsoft\Windows Messaging Subsystem\MSMapiApps key. The registry value for these keys can be empty or identify a mail client key that resides under HKLM\Software\Clients\Mail.

When the stub library resolves a MAPI call, it first enumerates the DLL and executable files listed under the HKLM\Software\Microsoft\Windows Messaging Subsystem\MSMapiApps key checking to see if the DLL or executable file is currently in process. If there is a match, the stub library gets the string value. If the value is the empty string, the stub library routes the call to the system MAPI DLL, Mapi32x.dll. If the string is not empty, the stub uses the string value to find the key below HKLM\Software\Clients\Mail where it can find the appropriate registry value to dispatch the call, one of DLLPath, DLLPathEx, or MSIComponentID values. For example:

HKLM\Software\Microsoft\Windows Messaging Subsystem\MSMapiApps::exchng32.exe = "" (route call directly to Mapi32x.dll)

HKLM\Software\Microsoft\Windows Messaging Subsystem\MSMapiApps::msspc32.dll = "Microsoft Outlook" (route call using Microsoft Outlook key under HKLM\Software\Clients\Mail)


Modification Type:MinorLast Reviewed:10/6/2005
Keywords:kbbug kbExchange2000preSP2fix kbfix kbQFE KB296862