Please enable JavaScript to view this site.

KOL/MCK - User Guide

In contrast to VCL, where in the Registry.pas module the work with the registry goes through objects, in KOL the main functionality for working with the registry is represented by a number of functions-adapters to the corresponding API functions. (If I'm not mistaken, there is also a volunteer-adapted TRegistry for KOL, but I use my own functions, and that's quite enough for me). These low-level functions, like the file access functions, operate on a descriptor like THandle, which is effectively an unsigned number.

 

A significant difference between the RegKeyXXXXX functions from working directly with the Windows registry API functions is that an incorrect or erroneous access to nonexistent or inaccessible registry keys, even in the absence of checks in the program for the success of the call, leads to idle call skips without any consequences. That is, in case of unsuccessful opening of the key, 0 is returned as a descriptor, and subsequent calls to other functions of this group with such a descriptor are simply ignored (and if it is necessary to return something, default values ​​are returned, i.e. zeros and empty strings ).

 

RegKeyOpenRead(k, s) - opens the registry key for reading;

RegKeyOpenWrite(k, s) - opens the key for writing;

RegKeyOpenCreate(k, s) - creates a key (if it has not been created yet) and opens it for writing;

RegKeyClose(r) - closes an open handle;

RegKeyDelete(r, s) - deletes the subkey with the given name;

 

RegKeyGetStr(r, s) - returns the value of a string value;

RegKeyGetStrEx(r, s) - the same as the previous function, but additionally understands values ​​of the REG_EXPAND_SZ type (i.e. system variables like% TEMP% are replaced by their values ​​from environment variables);

RegKeySetStr(r, s, s1) - writes a string value;

RegKeySetStrEx(r, s, s1, e) - the same as the previous function, but allows writing values ​​of the REG_EXPAND_SZ type;

 

RegKeyGetDw(r, s) - returns the value of a numeric value (or a value that can be interpreted as numeric);

RegKeySetDw(r, s, i) - writes a numerical value;

 

RegKeyDeleteValue(r, s) - deletes the value;

RegKeyExists(r, s) - checks for the presence of a key;

RegKeyValExists(r,s) - checks for the presence of a value;

RegKeyValueSize(r, s) - returns the size of the value;

RegKeyGetBinary(r, s, buf, n) - reads a binary value into the buffer;

RegKeySetBinary(r, s, buf, n) - writes a binary value;

RegKeyGetDateTime(r, s) - reads a date / time value;

RegKeySetDateTime(r, s, d) - writes a value of the date / time type;

RegKeyGetValueTyp(r, s) - returns the type of the value;

RegKeyGetValueNames(r, list) - lists the names of all values ​​in the specified list of type PStrList;

RegKeyGetSubKeys(r, list) - lists all subkeys in the specified PStrList.

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC