Ring_WinCReg Extension

 

This Ring Extension helps access and edit windows registry entries and values easily from within Ring Programming Language

gallery/03
gallery/02

What's Ring_WinCReg?

Ring WinCReg extension is a very light, easy, and powerful extension for Ring Programming Language that has been made to bring all means of easiness in regard to the dealing with Windows Registry. It gives you the ability to do from minor registry needs like saving or restoring settings to more superior goals like reaching and manipulating every single key or value in the whole registry tree.

This extension has been made on top of previously created C++ language class called “Registry Wrapper Class (CRegisry Class)” that has been published on CodeProject in this article.

RCRegistry Class Library

RCRegistry class, stands for Ring CRegistry Class or CRegistry Class for Ring, is a Ring Class that has been made to make using ring_wincreg extension functions easier by using the style of using “Registry Wrapper Class” in C++. I found this style is reasonable and readable better than just using the ring_wincreg original functions. It can be used by loading the file that contain it (wincreg.ring).

Note: RCRegistry Class in Ring_WinCReg Extension is now compatible with Ring 1.1 and above.

It will show errors if used with Ring 1.0.

How to use in Ring?

  1. Download extension files from this page or you can download them from GitHub, or Sourceforge Ring_WinCReg pages.

  2. Extract all the files that present in the "bin" folder and copy them into "bin" folder of the binary ring.

  3. Load the "wincreg.ring" file as it loads all of the extension and its associated library features.

  4. For more information on how to use this extension and its associated library functions go to documentation.

Example

This is a simple ring code that uses this extension:

Load "wincreg.ring"

 

Reg = new RCRegistry

 

Reg.OpenKey([HKEY_CURRENT_USER, "Software\MyApplication"])

# This will create a Key called "MyApplication" if its not present then it will be Opened

 

Reg["AppVersion"].SetValue("2.3")

 

See Reg["AppVersion"].GetValue()

 

Reg.CloseKey()

gallery/02

CHANGELOG:

* 29-5-2017:

- New release (v1.2).

- Change name of "EntryCount()" function into "EntriesCount()".

- Update check for switch away from auto open mode.

* 13-5-2017:

- New release (v1.1).

* 12-5-2017:

- Update documentation.

- Fix delete key when using CREG_AUTOOPEN flag.

* 9-5-2017:

- Fix comma operator expression errors.

- Fix C++ CRegisry Open() function flags conditions.

* 6-5-2017:

- Add function to check acceptance of flags entered.

- Fix opening the key after shifting from auto open mode.

* 14-10-2016:

- Correct scope usage of attributes calling.

* 8-10-2016:

- Update the project post in the ring forum.

- Add to sourceforge.

- Upload documentation to http://Ring-WinCReg.sf.net/

* 7-10-2016:

- First Release (v1.0).

- Fix windows XP SP3 compatibilty.

- Fix recursive lists in Objects2Reg function (Ring Object Saving).

* 2-10-2016:

- Adding Ring Object Functions.

* 1-10-2016:

- Adding a seperate function to return expanded expandable string values.

* 27-9-2016:

- Adding functions for string <-> binary conversion.

- Convert documentation into Sphinx generated style.

* 18-9-2016:

- Adding REG_BINARY type support.

- Specifying functions for REG_DWORD and REG_SZ types.

* 17-9-2016:

- Adding REG_QWORD type support.

* 16-9-2016:

- Adding REG_EXPAND_SZ type support.

* 14-9-2016:

- Fix crash due to length of numbers passed.

* 10-9-2016:

- Update entry Exists() function, add entry Type() query function, and other improvements.

* 9-9-2016:

- Allow saving numbers as DWORD and update documentation.

* 3-9-2016:

- The first commit uploading the project to GitHub. The project was able to do some basic tasks of storing and retrieving data with elementary documentaion.

* 6-8-2016:

- The project post in the Ring Forum has been established.

* 12-7-2016:

- Download the core C++ Classes from codeproject and started reviewing, debugging, and development.