Add the Winapi.Windows
unit to your uses clause:
uses
Winapi.Windows, System.Win.Registry;
The next time you'll be missing a certain symbol, note that you can search for it using your favorite file browser by searching in the ..\Source
directory of your Delphi installation path. If you will refine the search for only *.pas
files and whole words only, you'll get e.g. for your KEY_WRITE
symbol 3 files, where this symbol exists:
..\Source\data\dsnap\Datasnap.DataBkr.pas
..\Source\rtl\common\System.Win.ComObj.pas
..\Source\rtl\win\Winapi.Windows.pas
Then if you open those 3 files and look how the symbol is used there, you'll find, that it's defined in the Winapi.Windows.pas
file and in the remaining two files is used just in certain function calls.