Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if Outlook is installed?
Message
De
22/09/2004 11:59:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00945014
Message ID:
00945045
Vues:
30
>The following line of code
>
>
>oOutlook = CreateObject("Outlook.Application")
>
>
>generates and error, if Outlook is not installed. Is there a way to check if Outlook is installed?
>
>Thank you.
? _IsClassRegistered("Outlook.application")

function _IsClassRegistered
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
*vfp7
*CLEAR DLLS 'RegOpenKey', 'RegCloseKey'
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