FILE: Unsupported MAPI DLLs for Use with Visual Basic 4.0

Last reviewed: September 29, 1997
Article ID: Q143043
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, version 4.0, for Windows
  • Microsoft Visual Basic for Applications version 1.0 (found in Microsoft Excel 5.0 and 7.0, and Microsoft Project 4.0 and 7.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.

| 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 Software Library:

 ~ vb4mapi.exe (size: 29558 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services
Keywords          : APrgOther VB4WIN SMapiCMC kbsample kbfile
Version           : 4.0
Platform          : WINDOWS


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.