PRB: You Receive the MAPI_E_FAILURE (2) MAPI Result Code If You Use Some Hotmail Simple MAPI functions (315500)
The information in this article applies to:
- Simple Messaging Application Programming Interface (MAPI)
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.5
- Microsoft Internet Explorer (Programming) 6.0
This article was previously published under Q315500 SYMPTOMS
If you have Microsoft MSN Hotmail set as your default e-mail client, you may receive the MAPI_E_FAILURE (2) MAPI result code when you call Simple MAPI functions other than MAPISendMail, MAPILogon, and MAPILogoff. You may also receive with MAPI_E_FAILURE (2) MAPI result code if you use a Microsoft Visual Basic code to call the MAPISendMail function.
CAUSE
This behavior can occur because the Hotmail Simple MAPI that is included with Microsoft Internet Explorer and that is contained in the Hmmapi.dll file only implements the three functions exported as MAPISendMail, MAPILogon, and MAPILogoff. All other Simple MAPI functions that are exported by the Hmmapi.dll file return the MAPI_E_FAILURE (2) MAPI result code.
This includes the BMAPI functions, such as BMAPISendMail, which are typically exported by Simple MAPI implementations to allow Visual Basic programs to call them. The BMAPI functions use simpler structures that Visual Basic can understand. Hotmail does not implement any of the BMAPI functions. Any call to them returns with the MAPI_E_FAILURE (2) MAPI result code.
RESOLUTION
To resolve this behavior, limit the use of Simple MAPI to the MAPISendMail function and do not use the BMAPI functions if you are using Hotmail as your default e-mail client.
STATUSThis behavior is by design.REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
163216 Updated Mapivb32.bas for Simple MAPI on 32-Bit Platforms
315458 PRB: Simple MAPI BMAPI Functions Might Not Work With MAPI Stub Library
Modification Type: | Major | Last Reviewed: | 3/19/2004 |
---|
Keywords: | kbprb KB315500 |
---|
|