Microsoft KB Archive/166503

= PRB: Creating One-Off Address Causes Application Error =

Article ID: 166503

Article Last Modified on 8/18/2005

-

APPLIES TO


 * Microsoft Messaging Application Programming Interface, when used with:
 * Microsoft Windows Messaging

-



This article was previously published under Q166503



SYMPTOMS
Address book providers that allow creating One-off addresses get an application error if they do not return MAPI_W_ERRORS_RETURNED as specified by the documentation.



STATUS
This behavior is by design and is not expected to change.



MORE INFORMATION
The following information is an excerpt from the January 1997 version of the Win32 SDK under the topic "IMAPIProp::GetProps":

Notes to Implementers

...

Return MAPI_W_ERRORS_RETURNED if you cannot retrieve the value for one or more of the requested properties. In the property value structure, set the type in the ulPropTag member to PT_ERROR and the Value member to a status code describing the error.

If you fail to set your return variable for this method to MAPI_W_ERRORS_RETURNED, you are essentially telling MAPI that you support all of the requested properties and they were set without error. MAPI then tries to work with all the expected properties, and when it tries to access a property that is not there, it generates an exception that the client application interprets as an application error, and it then crashes.

Keywords: kbprb KB166503

-

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

© Microsoft Corporation. All rights reserved.