# %readregistry() function

The %readregistry() function retrieves
string values from the registry.

**For UNIX:**Not Supported

## Syntax

```
result = %readregistry(registryEntry, valueName, buffer, &bufferSize)
```

## Parameter(s)

| registryEntry | String containing the name of the registry entry. This value is relative to the following registry directory: HKEY_LOCAL_MACHINE\SOFTWARE\RocketSoftware\D3\CurrentVersion\For example, to retrieve the UserLogon value, you can pass in the following: ```
registryEntry = "D3vme\pick0"
valueName = "UserLogon"
``` |
| --- | --- |
| valueName | String containing the name of the value to read. |
| buffer | char array to use as the output buffer. |
| bufferSize | Integer representing the size of the buffer Must be passed in as &bufferSize. |

## Returns

| 0 | OK |
| --- | --- |
| #0 | Exception Code |
| buffer | The value retrieved from the registry (only valid if return = 0) |
| bufferSize | Amount of the buffer actually used. |

---
Source: https://d3codex.com/pickbasic-flashbasic/percent-readregistry-function/ - part of the D3Codex reference.
