FIX: MAPIMessage.Object in Watch Window Causes Program Error (185653)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a

This article was previously published under Q185653

SYMPTOMS

Scrolling up and down in the Debug Watch window to see the properties of a MAPIMessage.Object causes an Application error and Visual FoxPro is shut down.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This has been corrected in Visual FoxPro 6.0.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Make sure that you have Microsoft Exchange installed on the test computer and have created a valid Exchange Profile.
  2. Create a program file and type the following code:
          oleMAPISession = CREATEOBJECT( "MSMAPI.MAPISession" )
          oleMAPIMessage = CREATEOBJECT( "MSMAPI.MAPIMessages" )
          WITH oleMAPISession
             .Signon()
                IF ( .SessionID > 0 )
                   oleMAPIMessage.SessionID = .SessionID
                   ACTIVATE WINDOW watch
                   oleMAPIMessage.FETCH()
                   SUSPEND
                ENDIF
           ENDWITH
  3. Save and run the program.
  4. When the Debug window opens (this may take a minute depending the speed of the computer), enter oleMapiMesssage in the Watch window.
  5. Expand the MAPI control (oleMapiMessage) and scroll down or up in the Watch window.
At this point, you will get an Application error and Visual FoxPro shuts down.

Modification Type:MajorLast Reviewed:12/11/1999
Keywords:kbbug KB185653 kbAudDeveloper