1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Added Delphi 6 support thanks to andreluisfc

This commit is contained in:
Salvador Díaz Fau
2024-03-23 18:21:32 +01:00
parent 76d3880633
commit 16639d5ea5
10 changed files with 58 additions and 10 deletions

View File

@@ -817,6 +817,10 @@ function GetCommandLineSwitchValue(const aKey : string; var aValue : ustring) :
/// </summary>
function IsCEFSubprocess : boolean;
{$IFNDEF FPC}{$IFNDEF DELPHI7_UP}
function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer;
{$ENDIF}{$ENDIF}
implementation
uses
@@ -3443,4 +3447,20 @@ begin
Result := GetCommandLineSwitchValue('type', TempValue) and (length(TempValue) > 0);
end;
{$IFNDEF FPC}{$IFNDEF DELPHI7_UP}
function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer;
var
TempString : string;
begin
if Offset <= 1 then
Result := Pos(SubStr, S)
else
begin
TempString := copy(S, Offset, length(S));
Result := Pos(SubStr, TempString);
if (Result > 0) then inc(Result, Offset - 1);
end;
end;
{$ENDIF}{$ENDIF}
end.