Knowledge Base Articles  

FILE: VB4MAPI.EXE Unsupported MAPI DLLs for Use with Visual Basic 4.0

Q143043


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


SUMMARY

The MAPI DLLs that come with Microsoft Windows, Windows NT, Windows 2000, 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)


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:

Vb4mapi.exe
For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

Additional query words: Vb4mapi

Keywords : kbfile kbMAPI kbVBp kbVBp400 kbVBp500 kbVBp600 kbOSWin98 kbGrpDSVBDB kbDSupport
Issue type : kbinfo
Technology : kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB500Search kbVB600Search kbVBA600Search kbVBA500 kbVBA600 kbVB500 kbVB600 kbVB400Search kbVB400 kbVBASearch kbZNotKeyword3


Last Reviewed: July 10, 2001