MiniM. Saving time.


| About | Download | Tools | Knowledge Base | How to Buy |

MiniM Overview

Getting Started

Download

Documentation

Tools

Cache Tools

GT.M Tools

Knowledge Base

FAQ

Contacts

Copyrights

MiniM Additional Tools | RUS | Jan 26, 2010

ZDLL module for MiniM to interact with Windows Registry

ZDL module for Windows Registry consists of:

  • ZDLL module zregistry.dll
  • routine ^%ZREGISTRY

Module make interaction, enumarating available data, reads and write registry data.

For root registry tree identfying functions are using special argument Root, which is used case insensitive and may be one of the following:

  • "HKCR" or "HKEY_CLASSES_ROOT"
  • "HKCU" or "HKEY_CURRENT_USER"
  • "HKLM" or "HKEY_LOCAL_MACHINE"
  • "HKU" or "HKEY_USERS"
  • "HKPD" or "HKEY_PERFORMANCE_DATA"
  • "HKDD" or "HKEY_DYN_DATA"
  • "HKCC" or "HKEY_CURRENT_CONFIG"
If module cannot execute operation, there are generated errors <FUNCTION>.

All registry values and names listed in example, are exlusively testing and does not relate to any real application, it is only examples. Note that the Windows registry exists only on one instance and inaccurate registry calls may destroy critical data for other applications.

Module functions:

LoadLibrary()
Return: none

Arguments: none

Purpose: LoadLibrary call is recommended to execute before mass registry calls to prevent time wasting for loading nd unloading module. After LoadLibrary module still loaded and ready to use without additional or hidden loading.

Example:

d LoadLibrary^%ZREGISTRY()
FreeLibrary()
Return: none

Arguments: none

Purpose: unloads zdll module if module was previously loaded by LoadLibrary() call.

Example:

d FreeLibrary^%ZREGISTRY()
CreateKey(Root,Key)
Return: 1 if key created successfully and 0 otherwise

Arguments: Key - registry key identification string.

Purpose: creates new key in registry.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>w $$CreateKey^%ZREGISTRY(root,key)
1
DeleteKey(Root,Key)
Return: 1 if key was removed successfully or 0 otherwise.

Arguments: Key - registry key identification string.

Purpose: deletes key from registry. On secondary calls for the same key return 0.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>w $$DeleteKey^%ZREGISTRY(root,key)
1
USER>w $$DeleteKey^%ZREGISTRY(root,key)
0
DeleteValue(Root,Key,Name)
Return: 1 if value was removed successfully or 0 otherwise

Arguments: Key - registry key identification string, Name - name identification string.

Purpose: deletes from registry value specified by Name in Key.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>s name="Directory"

USER>w $$DeleteValue^%ZREGISTRY(root,key,name)
1
GetDataInfo(Root,Key,Name)
Return: empty string if this record does not exists, or type code and length of record otherwise delimited by comma. Types of records:
  • 0 - undeterminated
  • 1 - string
  • 3 - number
  • 4 - bynary data

Arguments: Key - registry key identification string, Name - name identification string.

Purpose: determina type of record and length of data id this record exists.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>s name="Directory"

USER>w $$GetDataInfo^%ZREGISTRY(root,key,name)
1,13
GetKeyNames(Root,Key,Names)
Return: number of subkeys of specified key and subkey names. Subkey names are returned as subscripts of local variable Names, passed by reference.

Arguments: Key - registry key identification string, Names - reference to local variable to receive subkey names in subscripts.

Purpose: return all available subkey names and total number.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM"

USER>w $$GetKeyNames^%ZREGISTRY(root,key,.names)
1
USER>zw names
names("Export")=""
GetValueNames(Root,Key,Names)
Return: number of values in this key.

Arguments: Key - registry key identification string, Names - reference to local variiable to receive value's names in subscripts.

Purpose: return value's names in specified registry key and total number.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>w $$GetValueNames^%ZREGISTRY(root,key,.names)
1
USER>zw names
names("Directory")=""
HasSubKeys(Root,Key)
Return: 1 if this key have subkeys or 0 otherwise.

Arguments: Key - registry key identification string

Purpose: determine and return subkey's existings indicator.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM"

USER>w $$HasSubKeys^%ZREGISTRY(root,key)
1
USER>s key="SOFTWARE\MiniM\Export"

USER>w $$HasSubKeys^%ZREGISTRY(root,key)
0
KeyExists(Root,Key)
Return: 1 if this key exists or 0 otherwise

Arguments: Key - registry key identification string

Purpose: determine and return key existence indicator.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>w $$KeyExists^%ZREGISTRY(root,key)
1
USER>s key="SOFTWARE\MiniM\FFFF"

USER>w $$KeyExists^%ZREGISTRY(root,key)
0
ValueExists(Root,Key,Name)
Return: 1 if this value exists or 0 otherwise

Arguments: Key - registry key identification string, Name - name identification string.

Purpose: determine and return value's existence indicator.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>s name="Directory"

USER>w $$ValueExists^%ZREGISTRY(root,key,name)
1
USER>s name="FFFF"

USER>w $$ValueExists^%ZREGISTRY(root,key,name)
0
ReadString(Root,Key,Name)
ReadInteger(Root,Key,Name)
ReadBinary(Root,Key,Name)
Return: read result

Arguments: Key - registry key identification string, Name - name identification string.

Purpose: functions reads data from registry by specified key and value name in depends of type, so ReadSring reads string, ReadInteger reads number and ReadBinary reads binary data (first 32 kbytes only).

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>s name="Directory"

USER>w $$ReadString^%ZREGISTRY(root,key,name)
c:\exportdata
WriteString(Root,Key,Name,Value)
WriteInteger(Root,Key,Name,Value)
WriteBinary(Root,Key,Name,Value)
Return: none

Arguments: Key - registry key identification string, Name - name identification string, Value - value of data to be written.

Purpose: creates of overwrites registry value by specified key and value name. All registry records are typed, so WriteString writes as zero-terminated string, WriteInteger writes as a number and WriteBinary writes bynary byte sequence.

Example:

USER>s root="HKEY_LOCAL_MACHINE"

USER>s key="SOFTWARE\MiniM\Export"

USER>s name="Directory"

USER>s value="c:\exportdata"

USER>d WriteString^%ZREGISTRY(root,key,name,value)

USER>

Download setup-zregistry.exe (for x86-32) (exe, 0.35Mb)
Download setup-zregistry_x64.exe (for x64) (exe, 0.34Mb)

Eugene Karataev
support@minimdb.com

To add module send text description and zip archive to mail: support@minimdb.com


Copyright (C) 2017 Eugene Karataev
Emails: Info Tech Support