# Read
> [HTML Version](read_mx138.htm)
**xcall MIAMEX, MX\_REGISTRY, REGOP\_READ, hkey, name, type, value, status**
Read is used to read a single value from the Registry.
**Parameters**
_hkey, name_
must be set as in opcode 3 ([Set](set_mx138.htm.md))
_type_ ([Num](num.htm.md)) \[out\]
is ignored on input, and is updated by the call to indicate the data type of the value returned (see table of data types under [Set](set_mx138.htm.md)).
_value _([String](string.htm.md), [Raw](blob.htm.md), or B,4 depending on the type of the data) \[out\]
returns the data. Note that the application is expected to either know the type of data, in which case it can supply an appropriate form of _value_, or it can use the overlay technique and then extract the data based on the returned _type_ field. Also note that for string data, _value_ must be large enough to include the trailing null. For example, you might map _value_ as:
MAP1 VALUEX,X,512
MAP1 VALUE\$,S,,512,@VALUEX
MAP1 VALUE,B,4,@VALUEX
_status_ (F6) \[out\]
0 for success, else error code.