System.Win.Registry.TRegistry.Access
Delphi
property Access: LongWord read FAccess write FAccess;
C++
__property unsigned Access = {read=FAccess, write=FAccess, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | System.Win.Registry.pas System.Win.Registry.hpp |
System.Win.Registry | TRegistry |
Description
Specifies the level of access to use when opening keys.
Use Access to specify the level of security access to use when opening keys. The OpenKey method uses the value of Access when opening a registry key. Access is initialized by the TRegistry constructor, but can be altered before calling OpenKey.
The value of Access is a set of flags or'd together, where each flag indicates a type of permission. Choose a value that grants sufficient permission to allow the desired actions while not exceeding the access level of the system running the application. The following table lists the flags that can be included:
Flag | Meaning |
---|---|
KEY_ALL_ACCESS |
combination of KEY_READ, KEY_WRITE, and KEY_CREATE_LINK. |
KEY_READ |
combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY. |
KEY_WRITE |
combination of KEY_SET_VALUE and KEY_CREATE_SUB_KEY. |
KEY_QUERY_VALUE |
grants permission to query subkey data. |
KEY_ENUMERATE_SUB_KEYS |
grants permission to enumerate subkeys. |
KEY_NOTIFY |
grants ability to receive change notifications. |
KEY_SET_VALUE |
grants permission to set subkey data. |
KEY_CREATE_SUB_KEY |
grants permission to create subkeys. |
KEY_CREATE_LINK |
grants permission to create symbolic links. |
KEY_EXECUTE |
restricts permission to read-only access. |
Note: Access is ignored by the CreateKey method, which always uses KEY_ALL_ACCESS.
See Also
Code Examples