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

NextPrevUpTopContentsIndex

enum-registry-value

Function
Summary

Enumerates the values of a registry key.

Package

win32

Signature

enum-registry-value subkey index &key root max-name-size max-buffer-size expected-type errorp => name, data-type, data, error-code

Arguments

subkey

A string specifying the name of the key.

index

An integer.

root

A keyword or handle.

max-name-size

An integer.

max-buffer-size

An integer.

expected-type

A keyword or t.

errorp

A boolean.

Values

name

A string.

data-type

A keyword.

data

A lisp object.

error-code

An integer error code or nil.

Description

The function enum-registry-value allows the values of subkey under the key root to be enumerated.

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

index specifies which value to return, with 0 being the first item.

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 value. The value is longer than this, an error is signaled. The default value of max-buffer-size is 1024.

If the value exists (that is, index is not too large), then the return values are the name, data type and data associated with the value in the registry. The argument expected-type controls how certain data types are converted to Lisp objects as follows:

Conversion of registry values to Lisp objects

data-type

expected-type

Description of converted data

:string

:lisp-object

String made with read-from-string

:string

Not supplied

String, exactly as in the registry

:environment-string

:string

String, exactly as in the registry

:environment-string

Not supplied

String, environment variables expanded

:integer

Not supplied

Integer

:little-endian-integer

Not supplied

Integer

:binary

Not supplied

A newly allocated foreign object

:binary

:lisp-object

Vector, element type (unsigned-byte 8)

The default value of expected-type is t.

If an error occurs and errorp is true, then an error is signaled. Otherwise, the return values are nil, nil, nil and the Windows error-code. The default value of errorp is t.

See also

create-registry-key


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex