Read is used to read a single value from the Registry.
xcall MIAMEX,MX'REGISTRY,4,hkey,name,type,value,status
hkey, name
must be set as in opcode 3 (Set)
type
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).
value (string, unformatted, or b,4 depending on the type of the data)
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. For example, you might map value as:
MAP1 VALUEX,X,512
MAP1 VALUE$,S,512,@VALUEX
MAP2 VALUE,B,4,@VALUEX
status (f,6)
0 for success, else error code.