COMCLASSINFO( ) Function
Returns registry information about a COM object such as a Visual FoxPro automation server.
An object reference to a COM or OLE object.
Specifies the type of information to return. The following table lists the values for nInfoType and the information returned.
nInfoType Information returned
The object's programmatic identifier (ProgID).A ProgID is a registry entry that can be associated with a CLSID.
The object's VersionIndependentProgID.The VersionIndependentProgID associates a ProgID with a CLSID. It is used to determine the latest version of an object application, refers to the application's class, and does not change from version to version.
The object's friendly name.
The object's class identifier (CLSID). A CLSID is a globally unique identifier that identifies a COM class object.
Type of object passed: Return value Description 1 Visual FoxPro object 2 ActiveX Control 3 COM Component 4 OLEBound object (General field)
COMCLASSINFO( ) returns the empty string if registry information isn't available for the object you specify. Visual FoxPro automation servers are COM objects, both .exe executable files and .dll dynamic link libraries you can create in the Project Manager.
If you create an instance of an ActiveX control by using CREATEOBJECT( ) as in the following code, nInfoType returns 3 (COM Component) rather than 2.
To return 2 (ActiveX control) you must use the object as such, as in the following code: