Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does OLE object exist or not?
Message
From
17/05/2001 05:10:41
 
 
To
16/05/2001 08:23:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00507741
Message ID:
00508221
Views:
27
>>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

Previous
Reply
Map
View

Click here to load this message in the networking platform