Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ler e Gravar no registro do Windows
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00727949
Message ID:
00728140
Views:
38
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform