Microsoft KB Archive/175220

From BetaArchive Wiki
Knowledge Base

XADM: Retrieving Properties on an Attachment Returns MAPI_E_NOT_ENOUGH_MEMORY

Article ID: 175220

Article Last Modified on 10/28/2006


  • Microsoft Exchange Server 4.0 Standard Edition

This article was previously published under Q175220


MAPI allows programmers to collect information about the properties of messages and their attachments. When an application makes a MAPI call to retrieve properties on an attachment, and PR_ATTACH_DATA_BIN is one of the requested properties, the call may fail with MAPI_E_NOT_ENOUGH_MEMORY. This only occurs the attachment is 31,010 to 32,768 bytes in size (the lower limit varies depending on what other properties are included in the request).


When a client does a GetProps() call, it passes a list of properties to collect information on. The store collects the requested properties and saves the information in a pre-allocated buffer to be returned to the client. The size of this buffer is 32,768. As properties are collected and saved in this buffer, the remaining free space in the buffer is updated. When the PR_ATTACH_DATA_BIN property is processed, an attempt is made to put the data in the buffer. Because there is insufficient space in the buffer for the attachment data, the function collecting the data returns an error. This error is not being processed correctly by the Information Store.


To work around this problem:

  • Increase the size of the attachment so it does not fall within the range of 31,010 to 32,768 bytes.


Microsoft has confirmed this to be a problem in Microsoft Exchange Server version 4.0. This problem has been corrected in the latest U.S. Service Pack for Microsoft Exchange Server version 4.0. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base:


Keywords: kbqfe kbhotfixserver kbbug kbfix kbusage KB175220