Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading value from registry
Message
From
26/08/2003 05:57:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00823319
Message ID:
00823329
Views:
20
>Hi All,
>i've sample to write and delete information from registry . i wantto read REG_SZ value from the registry entries but i couldn't from this sample . ie. this sample creates REG_SZ value with 8987-920092 under HKCU\SOYKAN\my_app . i wantto read this value and show or use for something.
>
>TIA
>
>
>
>Local loReg As Registry
>Local lcKey, lcKeyVal
>
>loReg = Newobject('Registry', Home()+'FFC\Registry.VCX')
>
>lcKey = 'Software\SOYKAN'
>lcKeyVal = 'My_App'
>
>Wait 'Look in registry editor' Window
>If (loReg.OpenKey(lcKey, loReg.nUserKey, .T.) == 0)
>	Wait '\HKCU\' + lcKey + ' created!' Window
>	
>	If (loReg.SetKeyValue(lcKeyVal, '8987-920092') == 0)
>		Wait '\HKCU\' + lcKey + '\' + lcKeyVal + ' created!' Window
>	
>	
>		RegDeleteValue(loReg.nCurrentKey, lcKeyVal)
>		Wait '\HKCU\' + lcKey + '\' + lcKeyVal + ' deleted!' Window
>		
>	Endif
>	loReg.DeleteKey(loReg.nUserKey, lcKey)
>	Wait '\HKCU\' + lcKey + ' deleted!' Window
>	loReg.Closekey()
>Endif
>
>loReg = Null
>Release loReg
>Release All
>Clear All
>
>
#Define HKEY_CURRENT_USER -2147483647
Local loReg As Registry
Local lcKey, lcKeyVal, cOptVal

loReg = Newobject('Registry', Home()+'FFC\Registry.VCX')
lcKey = 'Software\SOYKAN'
lcKeyVal = 'My_App'
cOptVal  = ''
If loReg.GetRegKey(m.lcKeyVal,@cOptVal,m.lcKey,HKEY_CURRENT_USER) = 0
  ? m.cOptVal
endif 
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform