JavaScript Editor js editor     Web development 

Main Page

Returns registry information about a COM object such as a Visual FoxPro automation server.

COMCLASSINFO(oObject [, nInfoType])



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

1 (Default)

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)

Return Value



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.

В Copy Code

To return 2 (ActiveX control) you must use the object as such, as in the following code:

В Copy Code

See Also

JavaScript Editor js editor     Web development