Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I detect if an ActiveX is registered?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
How can I detect if an ActiveX is registered?
Miscellaneous
Thread ID:
00181514
Message ID:
00181514
Views:
46
How can I check if an ActiveX control is
registered in the Windows Registry?


I read the following code in the VFUG April
98 Newsletter (http://www.vfug.org) but it does
not work all the times.

<...>
#DEFINE HKEY_CLASSES_ROOT -2147483648
DECLARE INTEGER RegOpenKey IN advapi32.DLL INTEGER, STRING @, INTEGER @

cActiveX_Control = 'Sheridan.ActiveTreeView.ActiveX'
lReturn = RegOpenKey( HKEY_CLASSES_ROOT, @cActiveX_Control, @hKey )

if lReturn = 0
? 'The ActiveX is registered'
else
? 'The ActiveX is not registered'
endif
<...>

Sometimes the Sheridan ActiveTreeView control is
registered with the KEY:
'Sheridan.ActiveTreeView.ActiveX'
and the above code works fine, however, sometimes
the KEY is something like:
'HKEY_CLASSES_ROOT\CLSID\{1C203F13-95AD-11D0-A84B-00A0247B735B}'
and in this later case the above code does not
work.


Does anybody know another mechanism to detect
is the ActiveX control is registered?


Thank you,
Hector Correa


Hector Correa
Reply
Map
View

Click here to load this message in the networking platform