These functions will help you perform most common tasks associated with storing and retrieving your application's settings. There are many situations where you may need to access the registry in a manner not supported by these functions. However, the use of most registry APIs is illustrated and it should not be difficult to use these functions as a starting point in developing your own routines. These functions are provided as a .Bas module that you can include in your project. The module is self contained and the syntax for all functions is explained below.
All functions return a non zero result when an error occurs.
Although use of the registry is recommended, the need to access ini files still exists. For that reason, these function will operate on either. 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.