The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



GetRegValueAsDouble


Unit: SDL_filesys
Class: none
Declaration: function GetRegValueAsDouble (RootKey: HKEY; SubKey, ValueID: string): double;

The function GetRegValueAsDouble reads a value of the Windows registry and interprets and returns it as a double precision number. The parameter RootKey defines the root key and can take one of the following values: HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG and HKEY_DYN_DATA. The parameter SubKey specifies the key (including its path) used within the branch of the root key and the parameter ValueID specifies the value to be retrieved.

The function returns the registry value always as a double precision value, no matter whether the value is stored as an integer or as a (double precision) string. If the type of the stored value is unknown, non-existant or not supported then the function returns a zero value. If the value is a string of a combination of digits and characters then the leading digits are read as a double precision number and the rest of the string is ignored.



Last Update: 2023-Feb-06