====================================================================== Microsoft(R) Product Support Services Application Note (Text File) WA0729: MICROSOFT MAIL SIMPLE MAPI UPDATE ====================================================================== Revision Date: 6/94 1 Disk Included The following information applies to Microsoft Mail for PC Networks, versions 3.0b and 3.2. ----------------------------------------------------------------------- | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY | | ACCOMPANY THIS DOCUMENT (collectively referred to as an Application | | Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF 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 Application Note. This Application Note 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 on the disk(s) | | must be copied without modification (the MS-DOS(R) utility | | diskcopy is appropriate for this purpose); 3) All components of | | this Application Note must be distributed together; and 4) This | | Application Note may not be distributed for profit. | | | | Copyright (C) 1993-1994 Microsoft Corporation. All Rights Reserved.| | Microsoft, MS-DOS, and Visual Basic are registered trademarks and | | Windows is a trademark of Microsoft Corporation. | |---------------------------------------------------------------------| Introduction ------------ The following files are included in this Application NOTE: Filename | Description ---------------------------------------------------------------------- TECHDISK.EXE | Mail technical reference disk TECHDOCS.EXE | Mail technical reference manual MAPI.DLL | Messaging Application Programming Interface (MAPI) | dynamic link library FRAMEWRK.DLL | Framework layer dynamic link library SAMPLE.EXE | Sample Simple MAPI application for sending mail | automatically. Source files included. The Simple MAPI files included on the technical reference disk allow application developers to include messaging capabilities in their applications' user interfaces. Support is provided for both Microsoft C and Microsoft Visual Basic(R). The disk provided with this Application Note contains TECHDISK.EXE, a replacement for the Mail technical reference disk that is included with versions 3.0b and 3.2 of Microsoft Mail for Windows. This replacement disk provides additional enhancements to the original Mail technical reference disk and includes the following modifications for versions 3.0b and 3.2 of Microsoft Mail for Windows: - MAPI.H has been modified to be strictly ANSI compatible, and no longer causes warnings on Warning Level 4 with the Microsoft C version 7.0 compiler. - The sample Visual Basic Simple MAPI application has been modified to compile when you use Microsoft Visual Basic version 2.0. The disk provided with this Application Note also contains TECHDOCS.EXE, an electronic version of the Mail technical reference manual that is included with version 3.2 of Microsoft Mail for Windows. This Application Note also includes the latest MAPI.DLL and FRAMEWRK.DLL files, and a sample Visual Basic program called Autosend (included in the SAMPLE.EXE file) that sends mail at specific times or intervals. The code for this application is included to allow additional capabilities such as checking mail response time between postoffices. The disk provided with this Application Note also contains MAPI.DLL, a replacement for the MAPI.DLL file that is included with versions 3.0b and 3.2 of Microsoft Mail for Windows. This replacement file provides additional enhancements to the original MAPI.DLL file and resolves the following problems that can occur when you are using versions 3.0b and 3.2 of Microsoft Mail for Windows: - Deleting a message in a shared folder does not function as expected; the message in the folder is deleted, but the header still appears. If you select the header to bring up the message, Mail for Windows returns a dialog box that says "The message cannot be accessed." Also, if you change a message in any way, the message becomes inaccessible. - Reply, Reply All, and Forward commands on customer messages in shared folders fail if these commands are called from Mail for Windows. This problem occurs because the client hands off the temporary message ID of the shared folder, instead of the permanent shared-folder message ID. NOTE: For this problem to be resolved, two files must be updated: the MAPI.DLL file (update included in this Application Note) and the MSMAIL.EXE file (update included in Application Note WA0889). - To correctly launch e-forms, Microsoft Electronic Forms Designer requires that the message type it gives to Simple MAPI be preserved in the delivered message. However, the message type is not encoded in WINMAIL.DAT by default, so it is lost across gateways. Therefore, the message is received and displayed as a note rather than as a Microsoft electronic form. The disk provided with this Application Note also contains FRAMEWRK.DLL, a replacement for the FRAMEWRK.DLL file that is included with versions 3.0b and 3.2 of Microsoft Mail for Windows. This replacement file resolves the following problem that can occur when you use versions 3.0b and 3.2 of Microsoft Mail for Windows: - When you execute the MAPIAddress() function, an "Out of Memory" error can occur. This problem occurs because a second MAPI session is being started and closed, and the MAPIAddress() function is then executed in the first session. To replace your simple MAPI files --------------------------------- 1. Insert the enclosed WA0729 disk in your floppy disk drive. 2. At the MS-DOS command prompt, type the following and press ENTER copy :\techref\disk\techdisk.exe where is the floppy disk drive containing the WA0729 disk and is the drive and directory where your Simple MAPI files currently reside. For example, if your Simple MAPI files are located in the MAILEXE\TECHREF directory on drive C and the WA0729 disk is in drive A, type the following command: copy a:\techref\disk\techdisk.exe c:\mailexe\techref 3. At the MS-DOS command prompt, type the following and press ENTER \techdisk.exe -d where is the drive and directory where your Simple MAPI files currently reside. For example, if your Simple MAPI files are located in the MAILEXE\TECHREF directory on drive C, type the following command: c:\mailexe\techref\techdisk.exe -d 4. At the MS-DOS command prompt, type the following and press ENTER copy \setup.inf \setupinf.old where is the complete path to the directory containing the Microsoft Mail for Windows SETUP.EXE program. For example, if SETUP.EXE is located in the MAILEXE directory on drive C, type the following command: copy c:\mailexe\setup.inf c:\mailexe\setupinf.old A message will be displayed stating: 1 file(s) copied. This indicates that your SETUP.INF file has been successfully copied. 5. Using any text editor, edit the SETUP.INF file. In the [MsMail System] section, replace the following line 1, mapi.dll,,,, 1993-03-09, !DECOMPRESS,, OLDER, !READONLY ,,,,, SHARED, ,,,,, 53536,,,, 3.2.0.4027, with: 1, mapi.dll,,,, 1993-05-26, !DECOMPRESS,, OLDER, !READONLY ,,,,, SHARED, 54352,,,, 3.2.0.4037 Save the file and close the text editor. NOTE: For these changes to affect the entire network, each existing user must run Setup again. To use the technical reference manual files ------------------------------------------- At the MS-DOS command prompt, type the following commands and press ENTER after each line md :\ copy \techref\doc\techdocs.exe :\techdocs.exe where is the local hard disk or network drive, is the floppy disk drive containing the WA0729 disk, and is the path where you want the technical reference manual files to reside. For example, if you want the files to reside in the C:\TECHDOCS directory and the WA0729 disk is in drive A, type the following command: md c:\techdocs copy a:\techref\doc\techdocs.exe c:\techdocs c:\techdocs\techdocs.exe The technical reference manual files are in Word for Windows 2.0 format. Read the README.TXT file in the directory where the technical reference files reside. To replace your MAPI.DLL and FRAMEWORK.DLL files ------------------------------------------------ At the MS-DOS command prompt, type the following and press ENTER copy< drive>:\*.DLL< destination> where is the floppy disk drive containing the WA0729 disk and is the drive and directory where your MAPI.DLL and FRAMEWRK.DLL files currently reside. For example, if your MAPI.DLL and FRAMEWRK.DLL files are located in the MAILEXE directory on drive C and the WA0729 disk is in drive A, type the following command: copy a:\*.DLL c:\mailexe A message will be displayed stating: 2 file(s) copied. This indicates that your MAPI.DLL and FRAMEWRK.DLL files have been successfully replaced. To use the Autosend application or source code ---------------------------------------------- 1. At the MS-DOS command prompt, type the following commands and press ENTER after each line md :\ copy :\sample\sample.exe :\sample.exe where is the local hard disk or network drive, is the floppy disk drive containing the WA0729 disk, and is the path where you want the sample application files to reside. For example, if you want the files to reside in the C:\SAMPLE directory and the WA0729 disk is in drive A, type the following command: md c:\sample copy a:\sample\sample.exe c:\sample c:\sample\sample.exe 2. At the MS-DOS command prompt, type the following commands and press ENTER after each line to use the Autosend application copy :\*.vbx c:\ copy :\*.dll c:\\system where is the drive and directory where the sample application resides and is the path to the Windows directory. For example, if the sample application is in the C:\SAMPLE directory and your Windows directory is C:\WINDOWS, type the following commands: copy c:\sample\*.vbx c:\windows copy c:\sample\*.dll c:\windows\system Run the sample application from Windows. To use the source code, you must use the Professional Edition of Microsoft Visual Basic version 2.0 or later.