Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FFC\registry.vcx (Editing registry)
Message
From
02/02/2000 18:51:44
 
 
To
02/02/2000 12:12:08
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00326226
Message ID:
00326494
Views:
19
>I am trying to understand the REGISTRY.VCX in VFP 6.
>
>The registry.vcx has these procedure
>
>procedure loadregfuncs
>procedure openkey
>procedure getkeyvalues
>procedure setkeyvalues
>.
>.
>.etc
>
>
>lo = crea("registry")
>lo.openkey(cloookupKey,nregKey,lCreateKey)
>
>I am trying to understand what are the three parms for ?
> what are the three parms should be???
>
>cLookUpKey = ???

The registry key to find

>nRegKey = ???

The base registry section, or hive, to find the registry key in. The choices are HKEY_LOCAL_MACHINE, HKEY_CURRENT USER, HKEY_CLASSES, HKEY_USERS (a collection of all users known to this system), and HKEY_CURRENT_CONFIG, these are constants define in REGISTRY.H

>lCreateKey = ???/
>

Whether or not trying to reference a non-existant key causes it to be created.

>
>How do I know which registry I am dealing with ???

You're limited to using the local registry with the FFC class.

Messing with the registry when you don't know what you're doing or why you're doing it, or what the consequence of doing it might be, is a good way to make a system unusable. Unless you understand data stored in the registry, stay away from it. You should probably do some reading. One book I've used as a text in classes I've given is "Troubleshooting And Configuring the Windows NT/95 Registry" by Clayton Johnson, ISBN 0-672-31066-X, published by SAMS. It's a bit dated (published in the dark antiquity of 1997), but the first 10 or 11 chapters, covering basic principles of the registry, are well-written, and the remainder of the book which deals in detail with some specific registry details are still applicable today, especially if you still run Win95.

Before you start changing things in the registry, do yourself a favor and create a boot disk that has at least ATTRIB, SYS, REGEDIT and a backup of the registry in case something goes wrong. If everything goes well, you've taken a couple of extra minutes as an extra precaution; if something bad happens, the backup and boot disk are lifesavers. NT boot disks are a bit trickier to set up; either buy a tool like ERD Commander, or go to www.ntfaq.com and follow the instructions for creating an NT boot disk precisely as outlined.

My best advice is to stay away from the registry until you understand what you want to do with it, and exactly how it should be done. There are classes derived from the base registry class in the VCX that use the regiistry class to work with specific things in the registry; you cn look at the code for these classes to see how to use the baase registry class.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform