BUG: The GETOBJECT() Function Fails When Calling a Visual FoxPro COM Server (255683)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q255683 SYMPTOMS
The GETOBJECT() function in Visual FoxPro activates an Automation object and creates a reference to the object. If the application is already running, you can prevent additional instances of the application from starting by omitting FileName and including ClassName, as in this example:
oleApp = GETOBJECT(, "Excel.Application")
This type of approach is also useful when you want to share Component Object Model (COM) objects between applications, sharing the object's properties, events, or methods (PEMs). For instance, a Microsoft Visual Basic application and a Microsoft Visual C++ application could exchange and share data via separate connections to the same instance of Microsoft Excel.
While Visual FoxPro allows you to create a COM server, the GETOBJECT() function cannot be used to instantiate it. The command fails with the following error message when you try:
OLE error code 0x800401e3: Operation unavailable.
Trying to call a Visual FoxPro COM server from Visual Basic using the Visual Basic GETOBJECT() function also results in an error message.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 8/27/2002 |
---|
Keywords: | kbbug kbCodeSnippet kbDSupport KB255683 |
---|
|