PRB: Simple MAPI BMAPI Functions May Not Work from Visual Basic Code (315458)
The information in this article applies to:
- Simple Messaging Application Programming Interface (MAPI)
This article was previously published under Q315458 IMPORTANT: This article contains information about modifying the registry. Before you
modify the registry, make sure to back it up and make sure that you understand how to restore
the registry if a problem occurs. For information about how to back up, restore, and edit the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
SYMPTOMS
Calls to the MAPISendMail function that are made from Microsoft Visual Basic code may fail with an error message that resembles the following:
Microsoft Outlook
Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client.
This problem often occurs when Microsoft Outlook Express is set as the default mail client.
CAUSE
Visual Basic programs that use Simple MAPI typically use Declare statements that import the BMAPI functions. When Outlook Express is the default mail client, the MAPI stub library cannot route these calls to Outlook Express; instead, the calls fail and an error message is displayed.
RESOLUTION
One way to resolve this problem is to not use Declare statements that reference the BMAPI functions. However, because Visual Basic cannot call the non-BMAPI functions (unless you manipulate the required structures at the binary level), you may want to write code to call the Simple MAPI functions from a language that can handle the structures, such a C or C++.
Two other resolutions are provided at the end of the "More Information" section.
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 3/4/2004 |
---|
Keywords: | kbMsg kbprb KB315458 |
---|
|