Function GetObject() Foundation
Returns a reference to an existing COM/ActiveX component.
GetObject( [<cFile>], [<cProgID>], [<lCreate>] ) --> oAutomationObject | NIL
The function returns an object of class AutomationObject. If the COM/ActiveX component does not exist and/or cannot be created, return value is NIL. In case GetObject() returns NIL, the functions ComLastError() and ComLastMessage() can be used to query the error number and the error message.
The AutomationObject returned can be used to access the methods and properties of the COM/ActiveX component, in the same way as with an ordinary Xbase++ object. Method calls as well as read or write access to a property (instance variable) is routed automatically to the COM/ActiveX component.
Unlike CreateObject(), GetObject() tries to return a running COM/ActiveX component. If the object does not exist and .F. was not passed with parameter <lCreate>, GetObject() creates a new COM/ActiveX component.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.