>>>Hi All,
>>>
>>>How would I be able to determine if a OCX file, DLL file, or ActiveX control has been registered?
>>>
>>
>>Check to see if the ProgID is found under HKEY_CLASSES_ROOT\
COM object ProgID in the registry.
>>If it is, the CLSID should be in a subkey. Check HKEY_CLASSES_ROOT\
CLSID and make sure that the server subkey and other information is stored under the CLSID, and any files are where they're specified.
>
>Sorry, but how would I be able to do this syntactically? Is there an VFP or API function that does this sort of thing?
>
The FFC contains a class that can read and write from the registry, Registry.VCX, with a class named registry.
#INCLUDE REGISTRY.H
oReg = NEWOBJECT('Registry','Registry.VCX')
IF oReg.GetRegKey('',"<i>ProgIDofControl</i>\CLSID",HKEY_CLASSES_ROOT) # 0
ENDIF
cCLSID = SPACE(0)
=oReg.OpenKey("<i>ProgIDofControl</i>\CLSID",HKEY_CLASSES_ROOT)
=oReg.GetKeyValue('',@cCLSID)
IF oReg.GetRegKey('',cCLSID,HKEY_CLASSES_ROOT) # 0
ENDIF
It gets painful. Reregistering the control is generally safe, and may avoid version problems if the ProgID doesn't change between versions.
>Thanks in advance,