All Manuals > LispWorks® User Guide and Reference Manual > 49 The Windows registry API

collect-registry-values Function

Summary

Returns the values of a registry key.

Package

win32

Signature

collect-registry-values subkey &key root max-name-size max-buffer-size expected-type errorp value-function => values-alist

Arguments
subkey
A string specifying the name of the key.
root
A keyword or handle.
max-name-size
An integer.
max-buffer-size
An integer.
expected-type
A keyword or t.
errorp
A boolean.
value-function
A function or symbol.
Values
values-alist
An alist.
Description

The function collect-registry-values returns an alist of all of the values of subkey under the key root.

subkey and root are interpreted as described for create-registry-key. The default value of root is :user.

max-name-size specifies the maximum length of the returned name. If the name is longer than this, an error is signaled. The default value of max-name-size is 256.

max-buffer-size specifies the maximum length in bytes of the data. If the data is longer than this, an error is signaled. The default value of max-buffer-size is 1024.

If value-function is nil, the returned values-alist is an association list containing pairs (name . data) consisting of the names and data of the values of subkey. expected-type controls how certain types are converted to Lisp objects as described for enum-registry-value. The default value of expected-type is t.

If value-function is non-nil, it should be a function with signature:

value-function handle subsubkey-name-and-value => name-and-value, collectp

value-function is funcalled for each subsubkey with the handle of subkey and a cons of the name and value of the subsubkey. If collectp is non-nil then name-and-value is collected into the alist values-alist to return from collect-registry-values. Otherwise name-and-value is ignored.

If an error occurs and errorp is true, then an error is signaled. Otherwise, values-alist is returned as nil if subkey could not be opened at all or contains nil for the data of any particular pair that cannot be read. The default value of errorp is t.

See also

collect-registry-subkeys
create-registry-key
enum-registry-value


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:09