Xbasic

REGISTRY.SAVE_SETTINGS Function

Syntax

V REGISTRY.SAVE_SETTINGS(C Registry_Key,P settings)

Arguments

Registry_KeyCharacter

The name of a registry entry.

settingsPointer

The registry setting(s) to store.

Description

Saves settings to the registry.

Discussion

The REGISTRY.SAVE_SETTINGS() method saves all of the sub-elements of a "dot" variable (called Dot_Variable ) in the Registry under the key Registry_Key (which is relative to the root key).

The root key is for Alpha Anywhere:

HKEY_CURRENT_USER\Software\Alpha Software\Alpha Anywhere 12.0

Example 

Store UserIdentity variable (with its sub-elements) into the Registry under Registry key of "UserIdentity".

'define the UserIdentity variable
DIM UserIdentity AS P
UserIdentity.Firstname = "John"
UserIdentity.Lastname = "Smith"
UserIdentity.Company = "Alpha Software"
UserIdentity.Address = "131 Middlesex Tpke"
UserIdentity.City = "Burlington"
UserIdentity.State = "MA"
UserIdentity.Zip = "01803"
UserIdentity.Phone = "781-229-2924"

'Save settings in Registry under the "UserIdentity" key
REGISTRY.SAVE_SETTINGS("UserIdentity", useridentity)

'The following examples saves the same variable under a different key, "MySpecialKey"
REGISTRY.SAVE_SETTINGS("MySpecialKey",useridentity)

See Also