Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Registry Entries for Windows 2000
Message
De
09/05/2001 14:30:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00504627
Message ID:
00505456
Vues:
23
I've checked the code and added to the case structure of the init of registry of Windows 5.00 - you were right about this one it was always going to the otherwise statement. This is a sample code that works with win95/98 and creates the registry keys.

***********************************************************
* C R E A T E / R E A D R E G I S T R Y K E Y S
***********************************************************

SET PROCEDURE TO REGISTRY
oRegistry = CreateObject("Registry")

lKey = oRegistry.IsKey("Software\POSYSTEM",-2147483647)

* Master key does not exist so create it:
IF NOT lKey

DO FORM Init LINKED

* Create keys:

oRegistry.OpenKey("\Software\POSYSTEM",-2147483647,.T.)
oRegistry.OpenKey("\Software\POSYSTEM\ODBC",-2147483647,.T.)

* Create entries :

oRegistry.SetRegKey("Standard","Unknown","Software\POSYSTEM\ODBC",-2147483647)
oRegistry.SetRegKey("Backup","Unknown","Software\POSYSTEM\ODBC",-2147483647)
oRegistry.SetRegKey("LoginType","1","Software\POSYSTEM\ODBC",-2147483647)
oRegistry.SetRegKey("LoginName","","Software\POSYSTEM\ODBC",-2147483647)
oRegistry.SetRegKey("LoginPw","","Software\POSYSTEM\ODBC",-2147483647)

Init.Release

ENDIF

DO FORM Init2 LINKED

cSettings = REPLICATE(chr(0),20*160)
oRegistry.GetRegKey("Standard",@cSettings,"Software\POSYSTEM\ODBC",-2147483647)
aODBC[1] = ALLTRIM(cSettings)

cSettings = REPLICATE(chr(0),20*160)
oRegistry.GetRegKey("Backup",@cSettings,"Software\POSYSTEM\ODBC",-2147483647)
aODBC[2] = ALLTRIM(cSettings)

cSettings = REPLICATE(chr(0),20*160)
oRegistry.GetRegKey("LoginType",@cSettings,"Software\POSYSTEM\ODBC",-2147483647)
Thisform.nLoginType = VAL(ALLTRIM(cSettings))

cSettings = REPLICATE(chr(0),20*160)
oRegistry.GetRegKey("LoginName",@cSettings,"Software\POSYSTEM\ODBC",-2147483647)
Thisform.cUserName = ALLTRIM(cSettings)

cSettings = REPLICATE(chr(0),20*160)
oRegistry.GetRegKey("LoginPw",@cSettings,"Software\POSYSTEM\ODBC",-2147483647)
Thisform.cPassword = ALLTRIM(cSettings)

Init2.Release

SET PROCEDURE TO

RETURN


My question : Is the -2147483647 value a common value for registry entries and if not, how do I acquire this value ? This is passed to the registry.prg as a parameter in nRegKey in the majority of the functions.

Appreciate all the suggestions on this one. :-) !
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform