FILE: Unsupported MAPI DLLs for Use with Visual Basic 4.0

ID: Q143043


The information in this article applies to:
  • Microsoft Visual Basic Standard, Professional, and Enterprise Editions for Windows, version 4.0
  • Microsoft Visual Basic for Applications versions 5.0, 6.0


SUMMARY

The MAPI DLLs that come with Microsoft Windows, Windows NT, and Windows 95 include a set of BMapi calls that were designed for use with Microsoft Visual Basic versions 1.0 through 3.0. Due to changes in the way Visual Basic for Applications (and Visual Basic 4.0) byte aligns its user-defined types, these function calls no longer work. Any attempts to use these calls results in a General Protection Fault (GPF) or a Bad DLL Calling Convention error message. The workaround is to use Vbamapi.dll or Vbamap32.dll. These helper DLLs perform the same actions as the old BMapi calls, but they are designed to work with Visual Basic for Applications and Visual Basic 4.0. Anyone who wants to make direct MAPI calls from Visual Basic will be required to use these (or similar) helper DLLs.

NOTE: These files are unsupported, so please do not contact Microsoft Technical Support for assistance with these files.

As an alternative, it is recommended that you use Collaboration Data Objects (CDO). For more information, please see the following article in the Microsoft Knowledge Base:

Q176916 : INFO: Active Messaging and Collaboration Data Objects (CDO)

---------------------------------------------------------------------
| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
| ACCOMPANY THIS DOCUMENT (collectively referred to as Microsoft     |
| Software Library [MSL] Vb4mapi.exe) IS PROVIDED "AS IS" WITHOUT    |
| WARRANTY ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT      |
| NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR    |
| FITNESS FOR A PARTICULAR PURPOSE. The user assumes the entire risk |
| as to the accuracy and the use of this MSL file. This MSL file     |
| may be copied and distributed subject to the following conditions: |
| 1) All text must be copied without modification and all pages must |
| be included; 2) If software is included, all files must be copied  |
| without modification; 3) All components of this MSL file must be   |
| distributed together; and 4) This MSL file may not be distributed  |
| for profit.                                                        |
|                                                                    |
| Copyright 1994 Microsoft Corporation. All Rights Reserved.         |
| Microsoft is a registered trademark of Microsoft Corporation.      |
 -------------------------------------------------------------------- 


MORE INFORMATION

Vbamapi.dll and Vbamap32.dll (along with their declarations files) are available for download. The following file is available for download from the Microsoft Download Center. Click the file name below to download the file:

Vb4mapi.exe
For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.

Additional query words: kbMAPI kbVBp400 kbWinOS98 kbVBp kbDSupport kbdse

Keywords : kbGrpVBDB
Version : WINDOWS:4.0,5.0,6.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.