PRB: ActiveX Control with "Message" Property Causes Page Fault

Last reviewed: May 22, 1997
Article ID: Q168827
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SYMPTOMS

Running a form created in Visual FoxPro 5.0 or 5.0a with an ActiveX control that has a property called "MESSAGE" causes an Invalid Page Fault.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

An ActiveX control created in Visual Basic 5.0 with a property called "MESSAGE" (in either uppercase or lowercase letters) causes an Invalid Page Fault in Visual FoxPro 5.0 or 5.0a running on Windows 95. The error on Windows NT is an "Application error" with Visual FoxPro referencing memory at location 0xffffffff that could not be read. MESSAGEBOX is a reserved word in Visual FoxPro and may possibly be the cause of the behavior. ActiveX controls normally do not need to avoid the container's reserved words in order to work properly. The use of other Visual FoxPro reserved words as ActiveX control property names does not, necessarily, cause the same behavior.

Steps to Reproduce Behavior

  1. In Visual Basic 5.0, create an ActiveX control as follows:

    a. Double-click the Form to open a Code window.

    b. From the Tools menu, select Add Procedure.

    c. On the Add Procedure dialog box, select Property and type "message"

          as the new property name.
    

    d. In the Code window, in both the Property Let() and Property Get()

          procedures, change the property type from "variant" to "string."
    

    e. Save the project and control files as "Test." Save the .ocx file as

          "Test.ocx" (The name of the control project and the control's
          Name property should be "Test.")
    

  2. In Visual FoxPro 5.0 or 5.0a, add the new control (Test.ocx) to the list of controls in the Tools Options dialog box. The control will appear in the ActiveX controls list as Project1.Test.

  3. Create a form and add the new ActiveX control. Run the form and an Invalid Page Fault (Windows 95) or Application Error (Windows NT) will occur.

NOTE: Adding new properties with names of other Visual FoxPro reserved
      words may not result in similar behavior.

REFERENCES

Visual Basic 5.0 Help


Keywords : FxinteropOcx kberrmsg kbinterop vfoxwin
Version : 5.0 5.0a
Platform : WINDOWS
Issue type : kbprb


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: May 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.