Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does OLE object exist or not?
Message
De
16/05/2001 08:23:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/05/2001 08:06:36
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00507741
Message ID:
00507745
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>Hiya.
>
>Is there a quick way to determin if an OLE object is registred on a system without performing CREATOBJECT() and handle the following error?
>
>I'm reading data from another OLE enabled app and I would like to check when I start my app so I can disable the update data feature if it's not there.

Magnus,
You could check registry. ie :
lparameters tcClass
#DEFINE HKEY_CLASSES_ROOT    -2147483648
#DEFINE ERROR_SUCCESS		0	&& OK

DECLARE Integer RegOpenKey IN Win32API ;
	Integer nHKey, String @cSubKey, Integer @nResult

DECLARE Integer RegCloseKey IN Win32API ;
	Integer nHKey

local lnKey
lnKey = 0
llRetVal = ( RegOpenKey(HKEY_CLASSES_ROOT, tcClass, @lnKey) = ERROR_SUCCESS )
if llRetVal
  RegCloseKey(lnKey)
endif
return llRetVal
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform