BUG: "Invalid Page Fault" After OLE Automation with WordPerfect (160251)



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 Q160251

SYMPTOMS

The following error occurs after you make an OLE Automation call to Corel WordPerfect 7.0:
VFP.EXE Caused an Invalid Page Fault in module OLEAUT32.DLL

CAUSE

WordPerfect is attempting to send a return value to Visual FoxPro.

WORKAROUND

Use an assignment statement to call the object methods.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Corel WordPerfect 7.0 does allow OLE Automation. In Visual FoxPro, you can use the CreateObject command to create a reference to a WordPerfect object, but you will still get the error when you try to call any of its methods.

Steps to Reproduce Behavior

Type the following commands in the Visual FoxPro Command window:
   oWP = CREATEOBJECT("WordPerfect.PerfectScript")
   oWP.FileNew
					
WordPerfect 7.0 actually creates a new document before Visual FoxPro generates an error.

To work around the problem, change the last command to the following:
   result = oWP.FileNew()
					

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kb3rdparty kbBug kberrmsg kbinterop KB160251