Microsoft KB Archive/296862

= XADM: Access Violation When You Move a Mailbox Programmatically by Using Cdoexm.dll =

Article ID: 296862

Article Last Modified on 2/20/2007

-

APPLIES TO


 * Microsoft Exchange 2000 Server Standard Edition

-



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:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

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



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 = &quot;&quot; (route call directly to Mapi32x.dll)

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

Additional query words: cdoexm.dll MoveMailbox

Keywords: kbbug kbexchange2000presp2fix kbfix kbqfe KB296862

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.