Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does OLE object exist or not?
Message
De
17/05/2001 05:10:41
 
 
À
16/05/2001 08:23:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00507741
Message ID:
00508221
Vues:
24
>>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

Thanks Cetin.

Just what I was looking for.
Magnus Nordin
VFP MCP

"We have tested the GUI on 5-year olds. Why? Beacuse they aren't braindead!"
Michael Spindler, Apple

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform