Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/168826

From BetaArchive Wiki

Article ID: 168826

Article Last Modified on 8/14/1999



APPLIES TO

  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a



This article was previously published under Q168826

SYMPTOMS

Adding a custom control that has been created in Visual Basic 5.0 using a custom method can cause a fault in Visual FoxPro 5.0 and 5.0a.

If the operating system is Windows 95, the message is "Illegal Operation - Invalid Page Fault." If the operating system is Windows NT, the error is an Application Error, Visual FoxPro referenced memory location 0x00000000, which could not be read.

RESOLUTION

Add SYS(2333,0) in the INIT event of the form, save and run the form at least once before adding the custom control to the form. Using the SYS(2333,0) disables the ActiveX dual interface (VTABLE binding) support.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Create the control in Visual Basic 5.0 with the following steps:

  1. Run Visual Basic 5.0, and select "Create new ActiveX control."
  2. Add a TextBox control to the form.
  3. Click Add-Ins on the menu. If the ActiveX Control Interface Wizard does not already show up as one of the options, select Add-Ins Manager.
  4. When the Add-Ins manager shows up, click the ActiveX Control Interface Wizard.
  5. Click the Add-Ins menu again, and select the ActiveX Control Interface Wizard.
  6. Click Next until you reach the Select Interface Members screen, then remove all props/events/methods from the Selected name list box.
  7. Click Next to go to the Create Custom Interface Member' screen, then click New.
  8. In the Add custom Member dialog box, type MYTEST under the Name text box, select Method for the type, and then click OK.
  9. Click Next twice, and then click Finish.
  10. From the File menu, select Make <project name> to compile the OCX.

In Visual FoxPro 5.0, do the Following:

  1. Start Visual FoxPro.
  2. Create a new form.
  3. Add an OLE Container control to the form.
  4. Select your new Visual Basic created control from the list (if you do not name the project or the control in Visual Basic, the name in the box will be Project1.UserControl1).

NOTE: A system error occurs, caused by Visual FoxPro 5. This error does not occur with Visual FoxPro 3.x.

Keywords: kberrmsg kbprb KB168826