System.Win.Registry.TRegistry.GetDataAsString

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetDataAsString(const ValueName: string; PrefixType: Boolean = false): string;

C++

System::UnicodeString __fastcall GetDataAsString(const System::UnicodeString ValueName, bool PrefixType = false);

Properties

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

Description

Reads data from a registry entry in the current key.

The GetDataAsString method returns the data from the registry entry with the name ValueName as a string.

The function behaves similarly to the GetData method, with the exception that regardless of the data type it encounters, it writes that data type as a string.

When set to True, PrefixType enables the prefixing of integer, binary, or unknown data types. The prefixes being used are dword: and hex:

Note: If the value being read is of type integer and the PrefixType is set, the value will be output as "prefix+hex" (for example, "dword:A"); otherwise, the value will be output as "decimal" (for example, "10").

See Also