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

NextPrevUpTopContentsIndex

set-registry-value

Function
Summary

Stores a value in the registry.

Package

win32

Signature

set-registry-value data subkey name &key root expected-type errorp => error-code

Arguments

data

A Lisp object.

subkey

A string specifying the name of the key.

name

A string specifying the name of the value.

root

A keyword or handle.

expected-type

A keyword or t.

errorp

A boolean.

Values

error-code

An integer error code or nil.

Description

The function set-registry-value sets the value associated with name in subkey under the key root.

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

The stored value is derived from data, converted according to expected-type as follows:

Conversion of Lisp objects to registry values

Lisp data

expected-type

Registry type

A string

:string

REG_SZ exactly as in data

Lisp value

:lisp-object

REG_SZ made with prin1-to-string of data

An integer

:integer

REG_DWORD containing data

A foreign pointer

:binary

REG_BINARY containing bytes of one element at the pointer

An array

:binary

REG_BINARY containing bytes from the array

The default value of expected-type is t.

If an error occurs and errorp is true then an error is signaled. The default value of errorp is t.

See also

create-registry-key
registry-value


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex