Detailed Descriptions > MIAMEX > MIAMEX 138: Registry operations
Set

This is used to write a new or updated value to the Registry.

xcall MIAMEX, MX_REGISTRY, REGOP_SET, hkey, name, type, value, status

Parameters

hkey  (B,4)  [in]

must be set to the hkeynew value returned from a previous call to Create or Open a key.

name  (String)  [in]

is the name of the value to write. (These are the items that appear in the left side of the right hand pane of REGEDIT.EXE.)

type  (Num)  [in]

specifies the type of value you want to write:

Symbol

Value

Description

REG_NONE

0

No type

REG_SZ

1

Null terminated string

REG_EXPAND_SZ

2

Same as (1) but signals that string may contain embedded environment variables (e.g. "%TEMP%\xyx.log")

REG_BINARY

3

Raw binary data (use X format)

REG_DWORD

4

4 byte integer (use B,4 format)

REG_MULTI'SZ

7

List of null terminated strings, with a double null terminating the list. See Replace Null Delimiters for an alternative to using null delimiters (with are hard to work with in BASIC).

 

value  (String, unformatted, or B,4 depending on type)  [in]

The data to write to the named item.

status  (F,6)  [out]

0 for success, else error code.