In real life, I use these functions in various applications that are in production everywhere. Also, instead of simply returning an error code they raise errors in the calling procedure. The intention here is to demonstrate registry access through API calls and not how to create ActiveX components. It is a simple matter to encapsulate these functions into a stand alone object. This standard module provides functions to store and retrieve values from the Windows registry as well as from .
All functions return zero on success and non-zero otherwise.
However, most of the examples provided below discard the return value. Function Name Description fReadValue Reads a string or binary or integer value from the registry or a string or integer value from an . ini file. If the registry key or .ini file entry does not exist it is created. Enumerates all subkeys under a registry key. The key cannot have any subkeys.