Partager via


Registry Access Foundation Class

Category System Utilities
Default Catalog Visual FoxPro Catalog\Foundation Classes\Utilities
Class registry
Base Class Custom
Class Library registry.vcx
Parent Class registry
Sample ...\Samples\Solution\WinAPI\regfox.scx

Remarks

This class provides access to information in the Windows Registry.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class on the form. You can then specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
CloseKey method Closes a registry key.
Syntax: CloseKey( )
Return: none
Arguments: none
DeleteKey method Deletes a registry key.
Syntax: DeleteKey(nUserKey, cKeyPath)
Return: none
Arguments:
nUserKey specifies the Registry User key.
cKeyPath specifies the Registry User key
path.
DeleteKeyValue method Deletes a value from a registry key.
Syntax: DeleteKeyValue(cOptName,
cKeyPath, nUserKey)
Return:
Arguments:
cOptName specifies the name of the
Registry key option.
cKeyPath specifies the path to the
Registry key.
nUserKey specifies the User key.
EnumKeys method Enumerates through a registry key.
Syntax: EnumKeys(@aKeyNames)
Return:
Arguments:
aKeyNames specifiesthe Registry keys to
enumerate.
EnumKeyValues method Enumerates through values of a registry
key.
Syntax: EnumKeyValues(@aKeyValues)
Return:
Arguments:
aKeyValues specifies the Registry User
key values to enumerate.
EnumOptions method Enumerates through all entries for a key
and populates an array with values.
Syntax: EnumOptions(@aRegOpts,
cOptPath, nUserKey, lEnumKeys)
Return:
Arguments:
aRegOpts specifies the Registry key
option.
cOptPath specifies the path to the
Registry key option.
nUserKey specifies the User key ID.
lEnumKeys specifies whether to
enumerate other options, if they exist.
GetKeyValue method Returns the value for a key.
Syntax: GetKeyValue(cValueName, cKeyValue)
Return:
Arguments:
cValueName specifies the name of the value to retrieve.
cKeyValue specifies the value of cValueName.
GetRegKey method Returns a registry key setting.
Syntax: GetRegKey(cOptName, cOptVal,
cKeyPath, nUserKey)
Return:
Arguments:
cOptName specifies the name of the
Registry key option.
cOptVal specifies the value to apply to
the option.
cKeyPath specifies the Registry key path.
nUserKey specifies the User key.
IsKey method Returns whether a specified key exists.
Syntax: IsKey(cKeyName, nRegKey)
Return:
Arguments:
cKeyName specifies the name of the user
ley to check, if it exists.
nRegKey specifies the Registry key ID
OpenKey method Opens a registry key.
Syntax: Open(cLookUpKey, nRegKey, lCreateKey)
Return:
Arguments:
cLookUpKey specifies the name of the
user key for which to search.
nRegKey specifies the Registry key ID
lCreateKey specifies whether to create a
new Registry key if the specified one
does not exist.
SetKeyValue method Sets the value of a registry key.
Syntax: SetKeyValue(cValueName,
cValue)
Return:
Arguments:
cValueName specifies the name of the
value to set.
cValue specifies the value to apply to
cValueName.
SetRegKey method Sets the registry key setting.
Syntax: SetRegKey(cOptName, cOptVal,
cKeyPath, nUserKey)
Return:
Arguments:
cOptName specifies the name of the
Registry key option.
cOptVal specifies the value to apply to
the option.
cKeyPath specifies the Registry key path.
nUserKey specifies the User key ID.
cAppPathKey property Internal to the class.
cIniDllFile property Internal to the class.
cODBCDllFile property Internal to the class.
cRegDllFile property Internal to the class.
cVfpOptPath property Internal to the class.
lCreateKey property Internal to the class.
lHadError property Internal to the class.
lLoaddedDlls property Internal to the class.
lLoadedInis property Internal to the class.
lLoadedOdbcs property Internal to the class.
nCurrentKey property Internal to the class.
nCurrentOS property Internal to the class.
nUserKey property Internal to the class.
LoadRegFuncs method Internal to the class.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Class Samples