articleWindows registry access made easy

finnianr's picture

Windows Registry Access

A new module, wel-regedit-x.ecf, has been added to Eiffel-Loop libraries that provides a more abstract interface to the WEL classes for accessing/modifying the registry in Windows. The following examples illustrate it's use.

Example 1

The following code fragment illustrates iterating over the sub keys of a registry key (EL_ITERABLE_REGISTRY_KEYS) and accessing binary data. As it happens, only the first sub key is required in this instance. The code is part of a class for extracting the physical dimensions of the currently active display monitor.  

Example 2

The following code adds some registry entries for applications that make use of the embedded browser provided by class EV_WEB_BROWSER. It prevents the browser from emulating an early version of IE provoking JavaScript errors. It illustrates setting an integer value (DWORD) and removing a key value.



Unfortunately to use this module you have to compile the entire WEL GUI library even if you are only using it in a command line application. But if you have a decent PC it shouldn't be too noticeable.

Syndicate content