DOCUMENT:Q269794 13-APR-2002 [exchange] TITLE :PRB: MAPI: Advise() Call Returns 0x8007000E (E_OUTOFMEMORY) PRODUCT :Microsoft Exchange PROD/VER::1.0,5.5 OPER/SYS: KEYWORDS:kbMAPI kbMsg kbDSupport exc55 ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Exchange Server, version 5.5 - Microsoft Extended Messaging Application Programming Interface (MAPI), version 1.0 ------------------------------------------------------------------------------- SYMPTOMS ======== When you call the Advise function about 7800 to 7900 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 7900. 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" (without the quotation marks) 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 : kbMAPI kbMsg kbDSupport exc55 Technology : kbAudDeveloper kbMAPISearch kbExchangeSearch kbExchange550 kbZNotKeyword kbZNotKeyword2 kbMAPIExt Version : :1.0,5.5 Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2002.