Please enable JavaScript to view this site.

KOL/MCK - User Guide

function RegKeyOpenRead( Key: HKey; const SubKey: KOLString ): HKey;

Opens registry key for read operations (including enumerating of subkeys). Pass either handle of opened earlier key or one of constans HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS as a first parameter. If not successful, 0 is returned.

 

function RegKeyOpenWrite( Key: HKey; const SubKey: KOLString ): HKey;

Opens registry key for write operations (including adding new values or subkeys), as well as for read operations too. See also RegKeyOpenRead.

 

function RegKeyOpenCreate( Key: HKey; const SubKey: KOLString ): HKey;

Creates and opens key.

 

function RegKeyGetStr( Key: HKey; const ValueName: KOLString ): KOLString;

Reads key, which must have type REG_SZ (null-terminated string). If not successful, empty string is returned. This function as well as all other registry manipulation functions, does nothing, if Key passed is 0 (without producing any error).

 

function RegKeyGetStrEx( Key: HKey; const ValueName: KOLString; ExpandEnvVars: Boolean ): KOLString;

Like RegKeyGetStr, but accepts REG_EXPAND_SZ type, expanding all environment variables in resulting string.

Code provided by neuron, e-mailto:neuron@hollowtube.mine.nu

 

function RegKeyGetDw( Key: HKey; const ValueName: KOLString ): DWORD;

Reads key value, which must have type REG_DWORD. If ValueName passed is '' (empty string), unnamed (default) value is reading. If not successful, 0 is returned.

 

function RegKeySetStr( Key: HKey; const ValueName: KOLString; const Value: KOLString ): Boolean;

Writes new key value as null-terminated string (type REG_SZ). If not successful, returns False.

 

function RegKeySetStrEx( Key: HKey; const ValueName: KOLString; const Value: KOLString; expand: Boolean ): Boolean;

Writes new key value as REG_SZ or REG_EXPAND_SZ. - by neuron, e-mailto:neuron@hollowtube.mine.nu

 

function RegKeySetDw( Key: HKey; const ValueName: KOLString; Value: DWORD ): Boolean;

Writes new key value as dword (with type REG_DWORD). Returns False, if not successful.

 

procedure RegKeyClose( Key: HKey );

Closes key, opened using RegKeyOpenRead or RegKeyOpenWrite. (But does nothing, if Key passed is 0).

 

function RegKeyDelete( Key: HKey; const SubKey: KOLString ): Boolean;

Deletes key. Does nothing if key passed is 0 (returns FALSE).

 

function RegKeyDeleteValue( Key: HKey; const SubKey: KOLString ): Boolean;

Deletes value. - by neuron, e-mailto:neuron@hollowtube.mine.nu

 

function RegKeyExists( Key: HKey; const SubKey: KOLString ): Boolean;

Returns TRUE, if given subkey exists under given Key.

 

function RegKeyValExists( Key: HKey; const ValueName: KOLString ): Boolean;

Returns TRUE, if given value exists under the Key.

 

function RegKeyValueSize( Key: HKey; const ValueName: KOLString ): Integer;

Returns a size of value. This is a size of buffer needed to store registry key value. For string value, size returned is equal to a length of string plus 1 for terminated null character.

 

function RegKeyGetBinary( Key: HKey; const ValueName: KOLString; var Buffer; Count: Integer ): Integer;

Reads binary data from a registry, writing it to the Buffer. It is supposed that size of Buffer provided is at least Count bytes. Returned value is actul count of bytes read from the registry and written to the Buffer.

This function can be used to get data of any type from the registry, not only REG_BINARY.

 

function RegKeySetBinary( Key: HKey; const ValueName: KOLString; const Buffer; Count: Integer ): Boolean;

Stores binary data in the registry.

 

function RegKeyGetDateTime( Key: HKey; const ValueName: KOLString ): TDateTime;

Returns datetime variable stored in registry in binary format.

 

function RegKeySetDateTime( Key: HKey; const ValueName: KOLString; DateTime: TDateTime ): Boolean;

Stores DateTime variable in the registry.

 

function RegKeyGetSubKeys( const Key: HKEY; List: PKOLStrList ): Boolean;

The function enumerates subkeys of the specified open registry key. True is returned, if successful.

 

function RegKeyGetValueNames( const Key: HKEY; List: PKOLStrList ): Boolean;

The function enumerates value names of the specified open registry key. True is returned, if successful.

 

function RegKeyGetValueTyp( const Key: HKEY; const ValueName: KOLString ): DWORD;

The function receives the type of data stored in the specified value.

If the function fails, the return value is the Key value.

If the function succeeds, the return value return will be one of the following:

REG_BINARY , REG_DWORD, REG_DWORD_LITTLE_ENDIAN, REG_DWORD_BIG_ENDIAN, REG_EXPAND_SZ, REG_LINK , REG_MULTI_SZ, REG_NONE, REG_RESOURCE_LIST, REG_SZ

 

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