Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get all the settings in IDE vs. run-time?
Message
From
02/02/2017 14:21:53
 
 
To
01/02/2017 17:09:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01647262
Message ID:
01647369
Views:
89
Nice.
But I found if a registry value is too long, a error 234 ("More data is available") is thrown, and the exteraction is terminated before reading all the registry keys.

So, at (or about) line 481 in the Registry.prg (in the EnumKeyValues method) the preassigned buffer size (SPACE(256) statement) needs to be increased. I have it set to 4096. My default PATH is longer then 256 bytes, and the method exits (at line 492) when attempting to retrieve that data.

The issue would not be seen unless someone was looking for it.

>Another code for vfp options settings
>
>*vfp/menu/tools/options fires a dialog boxes when can set al vfp configurations.
>*if click on button " set as default" all these configurations are wrote in registry
>*this code retrieves all this vf registry  settings (found 193)  with native registry class.
>
>
>#Define ERROR_SUCCESS 0
>#Define C_EXTNOFOUND_LOC "No information available for selected application."
>#Define C_NOREGFILE_LOC "The REGISTRY.PRG file needed for this sample could not be found in \Samples\Classes."
>
>Local oReg,regfile
>Local cOptionValue,cOptionName,nErrNum
>Public aFoxOptions
>
>regfile = Home(2)+"classes\registry.prg"
>If !File(m.regfile)
>	regfile = Home(1)+"samples\classes\registry.prg"
>	If !File(m.regfile)
>		Messagebox(C_NOREGFILE_LOC)
>		Return
>	Endif
>Endif
>
>Set Procedure To (m.regfile) Additive
>oReg = Createobject("FoxReg")
>Dimension aFoxOptions[1,2]
>m.nErrNum = oReg.EnumFoxOptions(@aFoxOptions)
>Create Cursor ycurs (Option c(40),Value c(100))
>Appe From Array aFoxOptions
>
>Browse  Name ybrow   Title "VFP registry settings: "+Trans(Reccount())  Nowait    &&window as oop object
>With ybrow
>    .GridLines=0
>    .RecordMark=.F.
>    .Width=300
>    .Left=100
>    .SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255)  , RGB(190,235,200))", "Column")
>    .FontBold=.T.
>    locate
>Endwith
>
>aFoxOptions=null
>release aFoxOptions
>Release Proc (m.regfile)
>
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform