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
03/02/2017 14:06:48
 
 
To
03/02/2017 13:24:16
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:
01647457
Views:
43
>Hi Greg
>i tested what you said previously.
>i copy the vfp registry.prg in a new file registry1.prg and made changes in this last replacing the value spac(256) by spac(4096).
>i run as administrator regedit.exe, made a fake new string in HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0\Options (see photo above) :_ayb (rightclick on pan and new value ("Chaîne" )
>in vfp command command _cliptext=repl("A",4000)
> ,go to the key above (options) ,right click on _ayb and paste clipboard.it have a length of 4000 chars.
>using the old registry.prg, this key is not retrieved at all but the code works (the cursor browsed)
>using the new registry1.prg (with changes) the key is shown at browse (troncated to fit the field legth).
>
>for 256 value the codes works in registry.prg until 253 chars value.
>for 4096 the code in regsitry1 works until 4093 chars only (maybe terminating unicode chars)
>
>conclusion : for long paths>253 length must make changes in the registry.prg to make it working. otherwise the long keys (paths for ex) are not shown.
>
>note : can do this operation from vfp/menu/tools/options and choose a long path in 'files'
>press ( values by default"+OK to save in registry

I agree. The Options\File Locations -> Search Path appears to have a large enough buffer to hold the entire path, and another registry entry too.

fyi: I choose 4096 as an arbitrary length. If need be, it could be longer, but why use more then necessary.

I made this suggestion to help you and others. It got me awhile back when I was using the registry to store data. I would save something, but then later I could not seem to get it back. The error number definition did not seem to imply the buffer overflow was occurring. It took me sometime of trial and error before I discovered the problem and solution.

Beware that this limited buffer size is used in several other places in the Registry.prg.
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform