System.Win.Registry.TRegistry.OpenKeyReadOnly

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function OpenKeyReadOnly(const Key: String): Boolean;

C++

bool __fastcall OpenKeyReadOnly(const System::UnicodeString Key);

Properties

Type Visibility Source Unit Parent
function public
System.Win.Registry.pas
System.Win.Registry.hpp
System.Win.Registry TRegistry

Description

Opens a specified key in a read-only manner.

Call OpenKeyReadOnly to make a specified key the current key. Key is the name of the key to open. If Key is an empty string (Delphi) or NULL (C++), the CurrentKey property is set to the key specified by the RootKey property.

Key is opened with the security access value KEY_READ.

OpenKeyReadOnly returns True if the key is successfully opened and CurrentKey is set to the key.

Note: After a successful call to OpenKeyReadOnly, the Access property of the registry component is automatically changed to KEY_READ, regardless of what that property was set to prior to the method call.

See Also