You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KEY_WOW64_32KEY is not declared in Delphi 2006, so the condition in procedure TSynPasSyn.EnumUserSettings must be changed to {$IFNDEF SYN_DELPHI_2007_UP}:
procedure LoadKeyVersions(const Key, Prefix: string);
var
Versions: TStringList;
i: Integer;
begin
with TBetterRegistry.Create(KEY_READ or KEY_WOW64_32KEY) do
begin
try
RootKey := HKEY_LOCAL_MACHINE;
if OpenKeyReadOnly(Key) then
begin
try
Versions := TStringList.Create;
try
GetKeyNames(Versions);
for i := 0 to Versions.Count - 1 do
DelphiVersions.Add(Prefix + Versions[i]);
finally
FreeAndNil(Versions);
end;
finally
CloseKey;
end;
end;
finally
Free;
end;
end;
end;
begin
LoadKeyVersions('\SOFTWARE\Borland\Delphi', '');
LoadKeyVersions('\SOFTWARE\Borland\BDS', BDSVersionPrefix);
LoadKeyVersions('\SOFTWARE\CodeGear\BDS', BDSVersionPrefix);
LoadKeyVersions('\SOFTWARE\Embarcadero\BDS', BDSVersionPrefix);
end;
The text was updated successfully, but these errors were encountered:
(How does one tag multiline code? seems only to work for single lines )
dummzeuch
changed the title
Delphi 2006 compile error in SynHighlitherPas, line 1355
Delphi 2006 compile error in SynHighligtherPas, line 1355
Apr 2, 2021
dummzeuch
changed the title
Delphi 2006 compile error in SynHighligtherPas, line 1355
Delphi 2006 compile error in SynHighlighterPas, line 1355
Apr 2, 2021
KEY_WOW64_32KEY is not declared in Delphi 2006, so the condition in procedure TSynPasSyn.EnumUserSettings must be changed to {$IFNDEF SYN_DELPHI_2007_UP}:
This is the working code:
procedure TSynPasSyn.EnumUserSettings(DelphiVersions: TStrings);
{$IFNDEF SYN_DELPHI_2007_UP}
const
KEY_WOW64_64KEY = $0100;
KEY_WOW64_32KEY = $0200;
{$ENDIF}
procedure LoadKeyVersions(const Key, Prefix: string);
var
Versions: TStringList;
i: Integer;
begin
with TBetterRegistry.Create(KEY_READ or KEY_WOW64_32KEY) do
begin
try
RootKey := HKEY_LOCAL_MACHINE;
if OpenKeyReadOnly(Key) then
begin
try
Versions := TStringList.Create;
try
GetKeyNames(Versions);
for i := 0 to Versions.Count - 1 do
DelphiVersions.Add(Prefix + Versions[i]);
finally
FreeAndNil(Versions);
end;
finally
CloseKey;
end;
end;
finally
Free;
end;
end;
end;
begin
LoadKeyVersions('\SOFTWARE\Borland\Delphi', '');
LoadKeyVersions('\SOFTWARE\Borland\BDS', BDSVersionPrefix);
LoadKeyVersions('\SOFTWARE\CodeGear\BDS', BDSVersionPrefix);
LoadKeyVersions('\SOFTWARE\Embarcadero\BDS', BDSVersionPrefix);
end;
The text was updated successfully, but these errors were encountered: