Microsoft KB Archive/269794

= MAPI Advise call returns 0x8007000E (E_OUTOFMEMORY) =

Article ID: 269794

Article Last Modified on 1/13/2006

-

APPLIES TO


 * Microsoft Exchange Server 5.5 Standard Edition
 * Microsoft Messaging Application Programming Interface

-



This article was previously published under Q269794



SYMPTOMS
When you call the Advise function about 7,800 to 7,900 times, the next Advise call may fail with the error 0x8007000E (E_OUTOFMEMORY).



CAUSE
Notifications, which are registered by calling Advise, use a shared memory space. By default the heap size is set as 0x100000. If the heap size is exceeded when registering a new notification, the E_OUTOFMEMORY error is returned.

This limit is system-wide; in other words, if you are running two programs that call Advise, the combined maximum for both programs should be less than 7,900.



WORKAROUND
You can configure the heap size to be as high as 0x800000 by setting the following registry keys:

HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem\SharedMemMaxSize HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem\Applications\MyApp\SharedMemMaxSize

Note The application that first calls the MAPIInitialize function sets the global heap size. Therefore, if Mad.exe (the System Attendant) is the first to start, you must make sure that the registry key is set for Mad.exe as well.

Additional query words: 0x8007000E E_OUTOFMEMORY

Keywords: kbmsg kbprb KB269794

-

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

© Microsoft Corporation. All rights reserved.