# Enumerate keys

> [HTML Version](enumeratekeys.htm)

**xcall MIAMEX, MX\_REGISTRY, REGOP\_ENUMKEYS, hkey, subkey, index, status**

This is used to list the subkeys of the opened key.

**Parameters**

_hkey_  \[in\]

must be set as in opcode 3 ([Set](set_mx138.md))

_subkey  _([String](string.md))  \[out\]

will return the subkey name.

_index  _([Num](num.md))  \[in\]

should be set to 0 for the first subkey, and incremented for each subsequent subkey. There is no particular order to the subkeys, so do not put any special significance on _index_.

_status  _(F,6)  \[out\]

0 for success, else error code. Error 259 indicates that there are no more keys to enumerate.