Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ler e Gravar no registro do Windows
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00727949
Message ID:
00728140
Vues:
39
Oi Geraldo,
#DEFINE HKEY_CLASSES_ROOT           -2147483648  && BITSET(0,31)
#DEFINE HKEY_CURRENT_USER           -2147483647  && BITSET(0,31)+1
#DEFINE HKEY_LOCAL_MACHINE          -2147483646  && BITSET(0,31)+2
#DEFINE HKEY_USERS                  -2147483645  && BITSET(0,31)+3
  
LOCAL loRegistry 
loRegistry = NEWOBJECT("Registry", HOME() + "Ffc\Registry")

*
* Lendo...
*
LOCAL lcProductID
IF loRegistry.GetRegKey("ProductID", ;
                        @lcProductID, ;
                        "SOFTWARE\Microsoft\VisualFoxPro\7.0\Registration", ;
                        HKEY_LOCAL_MACHINE) = 0
  MESSAGEBOX(lcProductID)
ENDIF

*
* Escrevendo...
*
loRegistry.OpenKey("SOFTWARE\NovoFornecedor\NovoProduto", HKEY_LOCAL_MACHINE, .T.)
loRegistry.SetRegKey("NovaChave", ;
                     lcProductID, ;
                     "SOFTWARE\NovoFornecedor\NovoProduto", ;
                     HKEY_LOCAL_MACHINE)
-----
Fabio Vazquez
http://www.fabiovazquez.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform