mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 10:48:30 +02:00
--- Merging r41267 into '.':
U packages/fcl-registry/src/registry.pp U packages/fcl-registry/src/winreg.inc --- Recording mergeinfo for merge of r41267 into '.': U . git-svn-id: branches/fixes_3_2@43902 -
This commit is contained in:
parent
75a8525c7f
commit
c833d621b7
@ -32,7 +32,7 @@ type
|
||||
end;
|
||||
|
||||
TRegDataType = (rdUnknown, rdString, rdExpandString, rdBinary, rdInteger, rdIntegerBigEndian,
|
||||
rdLink, rdMultiString, rdResourceList, rdFullResourceDescriptor, rdResourceRequirementList);
|
||||
rdLink, rdMultiString, rdResourceList, rdFullResourceDescriptor, rdResourceRequirementList, rdInt64);
|
||||
|
||||
TRegDataInfo = record
|
||||
RegData: TRegDataType;
|
||||
@ -95,6 +95,7 @@ type
|
||||
function ReadDateTime(const Name: string): TDateTime;
|
||||
function ReadFloat(const Name: string): Double;
|
||||
function ReadInteger(const Name: string): Integer;
|
||||
function ReadInt64(const Name: string): Int64;
|
||||
function ReadString(const Name: string): string;
|
||||
procedure ReadStringList(const Name: string; AList: TStrings);
|
||||
function ReadTime(const Name: string): TDateTime;
|
||||
@ -118,6 +119,7 @@ type
|
||||
procedure WriteDateTime(const Name: string; Value: TDateTime);
|
||||
procedure WriteFloat(const Name: string; Value: Double);
|
||||
procedure WriteInteger(const Name: string; Value: Integer);
|
||||
procedure WriteInt64(const Name: string; Value: Int64);
|
||||
procedure WriteString(const Name, Value: string);
|
||||
procedure WriteExpandString(const Name, Value: string);
|
||||
procedure WriteStringList(const Name: string; List: TStrings);
|
||||
@ -347,6 +349,17 @@ begin
|
||||
Raise ERegistryException.CreateFmt(SInvalidRegType, [Name]);
|
||||
end;
|
||||
|
||||
function TRegistry.ReadInt64(const Name: string): Int64;
|
||||
|
||||
Var
|
||||
RegDataType: TRegDataType;
|
||||
|
||||
begin
|
||||
GetData(Name, @Result, SizeOf(Int64), RegDataType);
|
||||
If RegDataType<>rdInt64 Then
|
||||
Raise ERegistryException.CreateFmt(SInvalidRegType, [Name]);
|
||||
end;
|
||||
|
||||
function TRegistry.ReadBool(const Name: string): Boolean;
|
||||
|
||||
begin
|
||||
@ -516,6 +529,11 @@ begin
|
||||
PutData(Name, @Value, SizeOf(Integer), rdInteger);
|
||||
end;
|
||||
|
||||
procedure TRegistry.WriteInt64(const Name: string; Value: Int64);
|
||||
begin
|
||||
PutData(Name, @Value, SizeOf(Int64), rdInt64);
|
||||
end;
|
||||
|
||||
procedure TRegistry.WriteString(const Name, Value: string);
|
||||
var
|
||||
u: UnicodeString;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Const
|
||||
RegDataWords : Array [TRegDataType] of DWORD
|
||||
= (REG_NONE,REG_SZ,REG_EXPAND_SZ,REG_BINARY,REG_DWORD,REG_DWORD_BIG_ENDIAN,
|
||||
REG_LINK,REG_MULTI_SZ,REG_RESOURCE_LIST,REG_FULL_RESOURCE_DESCRIPTOR,REG_RESOURCE_REQUIREMENTS_LIST);
|
||||
REG_LINK,REG_MULTI_SZ,REG_RESOURCE_LIST,REG_FULL_RESOURCE_DESCRIPTOR,REG_RESOURCE_REQUIREMENTS_LIST,REG_QWORD);
|
||||
|
||||
type
|
||||
TWinRegData = record
|
||||
|
Loading…
Reference in New Issue
Block a user