Microsoft KB Archive/155060

= XCLN: MAPIAddress Function Does Not Allocate Memory =

Article ID: 155060

Article Last Modified on 10/28/2006

-

APPLIES TO


 * Microsoft Exchange Client 5.5
 * Microsoft Exchange Client 5.0
 * Microsoft Exchange Client 4.0
 * Microsoft Exchange Client 5.0

-



This article was previously published under Q155060



SUMMARY
The Simple MAPI C function, MAPIAddress, does not dynamically allocate memory, as suggested in the MAPI Software Developer's Kit (SDK) online documentation.



MORE INFORMATION
The MAPI SDK online documentation states the following for the lppNewRecips parameter of the MAPIAddress function:

lppNewRecips

Output parameter pointing to an array of MapiRecipDesc structures containing the final list of recipients. This array is allocated by MAPIAddress...

This description implies that the MAPIAddress function allocates an array for the MapiRecipDesc structures. This is not accurate. In order to use this function properly, you must allocate memory for the array with a MALLOC statement in your code. If you do not do this, you may receive an exception error in Kernel32.dll and/or a MAPI_E_FAILURE error when using the MAPIAddress function.

Keywords: KB155060

-

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

© Microsoft Corporation. All rights reserved.