You've already forked lazarus-ccr
OnGuard: Fix compilation under 64-bit Windows.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8708 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -40,13 +40,13 @@
|
|||||||
<MinVersion Valid="True"/>
|
<MinVersion Valid="True"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="23">
|
<Units Count="26">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="codegen.lpr"/>
|
<Filename Value="codegen.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="CodeGen"/>
|
<UnitName Value="CodeGen"/>
|
||||||
<CursorPos X="73" Y="15"/>
|
<CursorPos X="73" Y="15"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="28"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
@ -57,10 +57,9 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="CodeGenU"/>
|
<UnitName Value="CodeGenU"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<CursorPos X="21" Y="8"/>
|
<CursorPos X="40" Y="18"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="28"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -69,7 +68,7 @@
|
|||||||
<ComponentName Value="KeyMaintFrm"/>
|
<ComponentName Value="KeyMaintFrm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="7"/>
|
||||||
<TopLine Value="38"/>
|
<TopLine Value="38"/>
|
||||||
<CursorPos X="32" Y="50"/>
|
<CursorPos X="32" Y="50"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
@ -118,18 +117,17 @@
|
|||||||
<ComponentName Value="CodeGenerateFrm"/>
|
<ComponentName Value="CodeGenerateFrm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="6"/>
|
||||||
<TopLine Value="500"/>
|
|
||||||
<CursorPos X="3" Y="504"/>
|
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
<Filename Value="..\..\source\onguard.pas"/>
|
<Filename Value="..\..\source\onguard.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="1488"/>
|
<EditorIndex Value="5"/>
|
||||||
<CursorPos X="18" Y="1498"/>
|
<TopLine Value="922"/>
|
||||||
|
<CursorPos X="6" Y="940"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
@ -153,9 +151,11 @@
|
|||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
<Filename Value="..\..\source\ogutil.pas"/>
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
<TopLine Value="714"/>
|
<EditorIndex Value="4"/>
|
||||||
<CursorPos X="32" Y="693"/>
|
<TopLine Value="1247"/>
|
||||||
|
<CursorPos X="6" Y="1271"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
<Unit14>
|
<Unit14>
|
||||||
<Filename Value="codegenu.lfm"/>
|
<Filename Value="codegenu.lfm"/>
|
||||||
@ -199,9 +199,11 @@
|
|||||||
</Unit19>
|
</Unit19>
|
||||||
<Unit20>
|
<Unit20>
|
||||||
<Filename Value="..\..\source\idesn.pas"/>
|
<Filename Value="..\..\source\idesn.pas"/>
|
||||||
<TopLine Value="37"/>
|
<EditorIndex Value="8"/>
|
||||||
<CursorPos Y="23"/>
|
<TopLine Value="137"/>
|
||||||
|
<CursorPos X="6" Y="155"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit20>
|
</Unit20>
|
||||||
<Unit21>
|
<Unit21>
|
||||||
<Filename Value="..\..\..\..\..\..\temp\fpc\rtl\inc\systemh.inc"/>
|
<Filename Value="..\..\..\..\..\..\temp\fpc\rtl\inc\systemh.inc"/>
|
||||||
@ -211,48 +213,157 @@
|
|||||||
</Unit21>
|
</Unit21>
|
||||||
<Unit22>
|
<Unit22>
|
||||||
<Filename Value="..\..\source\onguard.inc"/>
|
<Filename Value="..\..\source\onguard.inc"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="10"/>
|
||||||
<TopLine Value="31"/>
|
<TopLine Value="31"/>
|
||||||
|
<CursorPos X="19" Y="50"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit22>
|
</Unit22>
|
||||||
|
<Unit23>
|
||||||
|
<Filename Value="..\..\source\ogfirst.pas"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="133"/>
|
||||||
|
<CursorPos X="9" Y="152"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit23>
|
||||||
|
<Unit24>
|
||||||
|
<Filename Value="..\..\source\ogproexe.pas"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<TopLine Value="644"/>
|
||||||
|
<CursorPos X="9" Y="663"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit24>
|
||||||
|
<Unit25>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<EditorIndex Value="9"/>
|
||||||
|
<TopLine Value="456"/>
|
||||||
|
<CursorPos X="9" Y="482"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit25>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="9" HistoryIndex="8">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="codegenu.pas"/>
|
<Filename Value="..\..\source\qonguard2.pas"/>
|
||||||
<Caret Line="47" Column="51" TopLine="26"/>
|
<Caret Line="504" Column="3" TopLine="500"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="codegenu.pas"/>
|
<Filename Value="codegenu.pas"/>
|
||||||
<Caret Line="17" Column="18"/>
|
<Caret Line="18" Column="40"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="..\..\source\onguard.pas"/>
|
<Filename Value="..\..\source\qonguard2.pas"/>
|
||||||
<Caret Line="273" Column="18" TopLine="247"/>
|
<Caret Line="209" Column="19" TopLine="209"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="..\..\source\onguard.pas"/>
|
<Filename Value="..\..\source\qonguard2.pas"/>
|
||||||
<Caret Line="1494" TopLine="1488"/>
|
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="..\..\source\qonguard2.pas"/>
|
<Filename Value="..\..\source\idesn.pas"/>
|
||||||
<Caret Line="86" Column="32" TopLine="57"/>
|
<Caret Line="155" Column="6" TopLine="137"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="..\..\source\qonguard2.pas"/>
|
<Filename Value="..\..\source\ogfirst.pas"/>
|
||||||
<Caret Line="19" TopLine="19"/>
|
<Caret Line="152" Column="16" TopLine="165"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="..\..\source\onguard.pas"/>
|
<Filename Value="..\..\source\ogfirst.pas"/>
|
||||||
<Caret Line="1498" Column="18" TopLine="1488"/>
|
<Caret Line="69" Column="9" TopLine="50"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="..\..\source\qonguard2.pas"/>
|
<Filename Value="..\..\source\ogfirst.pas"/>
|
||||||
<Caret Line="76" Column="3" TopLine="58"/>
|
<Caret Line="86" Column="11" TopLine="55"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="..\..\source\qonguard2.pas"/>
|
<Filename Value="..\..\source\ogfirst.pas"/>
|
||||||
<Caret Line="504" Column="3" TopLine="500"/>
|
<Caret Line="97" Column="9" TopLine="78"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="..\..\source\ogfirst.pas"/>
|
||||||
|
<Caret Line="152" Column="9" TopLine="133"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="..\..\source\ogproexe.pas"/>
|
||||||
|
<Caret Line="675" Column="24" TopLine="643"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="..\..\source\ogproexe.pas"/>
|
||||||
|
<Caret Line="262" Column="9" TopLine="243"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="..\..\source\ogproexe.pas"/>
|
||||||
|
<Caret Line="377" Column="9" TopLine="358"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="..\..\source\ogproexe.pas"/>
|
||||||
|
<Caret Line="532" Column="9" TopLine="513"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="..\..\source\ogproexe.pas"/>
|
||||||
|
<Caret Line="663" Column="9" TopLine="644"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<Caret Line="482" Column="18" TopLine="456"/>
|
||||||
|
</Position16>
|
||||||
|
<Position17>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<Caret Line="100" Column="9" TopLine="81"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<Caret Line="142" Column="9" TopLine="123"/>
|
||||||
|
</Position18>
|
||||||
|
<Position19>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<Caret Line="190" Column="9" TopLine="172"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<Caret Line="228" Column="9" TopLine="209"/>
|
||||||
|
</Position20>
|
||||||
|
<Position21>
|
||||||
|
<Filename Value="..\..\source\ogsrmgr.pas"/>
|
||||||
|
<Caret Line="482" Column="9" TopLine="456"/>
|
||||||
|
</Position21>
|
||||||
|
<Position22>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="545" Column="18" TopLine="690"/>
|
||||||
|
</Position22>
|
||||||
|
<Position23>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="55" Column="9" TopLine="36"/>
|
||||||
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="77" Column="11" TopLine="58"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="304" Column="19" TopLine="288"/>
|
||||||
|
</Position25>
|
||||||
|
<Position26>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="548" Column="9" TopLine="529"/>
|
||||||
|
</Position26>
|
||||||
|
<Position27>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="847" Column="18" TopLine="831"/>
|
||||||
|
</Position27>
|
||||||
|
<Position28>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="1159" Column="18" TopLine="1143"/>
|
||||||
|
</Position28>
|
||||||
|
<Position29>
|
||||||
|
<Filename Value="..\..\source\ogutil.pas"/>
|
||||||
|
<Caret Line="1271" Column="6" TopLine="1247"/>
|
||||||
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="..\..\source\onguard.inc"/>
|
||||||
|
<Caret Line="50" Column="19" TopLine="31"/>
|
||||||
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
@ -284,7 +395,7 @@
|
|||||||
</Linking>
|
</Linking>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<BreakPoints Count="3">
|
<BreakPoints Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Kind Value="bpkSource"/>
|
<Kind Value="bpkSource"/>
|
||||||
<WatchScope Value="wpsGlobal"/>
|
<WatchScope Value="wpsGlobal"/>
|
||||||
@ -299,13 +410,6 @@
|
|||||||
<Source Value="..\..\source\qonguard3.pas"/>
|
<Source Value="..\..\source\qonguard3.pas"/>
|
||||||
<Line Value="212"/>
|
<Line Value="212"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
|
||||||
<Kind Value="bpkSource"/>
|
|
||||||
<WatchScope Value="wpsGlobal"/>
|
|
||||||
<WatchKind Value="wpkWrite"/>
|
|
||||||
<Source Value="..\..\source\qonguard2.pas"/>
|
|
||||||
<Line Value="236"/>
|
|
||||||
</Item3>
|
|
||||||
</BreakPoints>
|
</BreakPoints>
|
||||||
<Watches Count="1">
|
<Watches Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="20"/>
|
<TopLine Value="20"/>
|
||||||
<CursorPos X="70" Y="32"/>
|
<CursorPos X="37" Y="38"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
|
@ -49,7 +49,7 @@ uses
|
|||||||
|
|
||||||
function GetFileSize(Handle : THandle) : Cardinal;
|
function GetFileSize(Handle : THandle) : Cardinal;
|
||||||
|
|
||||||
{$IFNDEF Win32}
|
{$IFNDEF WINDOWS}
|
||||||
function LockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
function LockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
||||||
nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh: DWORD): Boolean;
|
nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh: DWORD): Boolean;
|
||||||
function UnlockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
function UnlockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
||||||
@ -69,7 +69,7 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
function GetFileSize(Handle : THandle) : Cardinal;
|
function GetFileSize(Handle : THandle) : Cardinal;
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
begin
|
begin
|
||||||
Result := Windows.GetFileSize(Handle, nil);
|
Result := Windows.GetFileSize(Handle, nil);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -84,7 +84,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
{$IFNDEF WIN32}
|
{$IFNDEF WINDOWS}
|
||||||
|
|
||||||
|
|
||||||
{$ifdef FPC}
|
{$ifdef FPC}
|
||||||
|
@ -66,7 +66,7 @@ const
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
var
|
var
|
||||||
FirstInstance : Boolean;
|
FirstInstance : Boolean;
|
||||||
InstanceMutex : THandle;
|
InstanceMutex : THandle;
|
||||||
@ -83,7 +83,7 @@ var
|
|||||||
{limit instances routines}
|
{limit instances routines}
|
||||||
function IsFirstInstance : Boolean;
|
function IsFirstInstance : Boolean;
|
||||||
begin
|
begin
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
Result := FirstInstance;
|
Result := FirstInstance;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
@ -94,7 +94,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
procedure ActivateFirstInstance;
|
procedure ActivateFirstInstance;
|
||||||
var
|
var
|
||||||
ClassBuf,
|
ClassBuf,
|
||||||
@ -149,7 +149,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
function GetMutexName : string;
|
function GetMutexName : string;
|
||||||
var
|
var
|
||||||
WindowBuf : array [0..512] of AnsiChar;
|
WindowBuf : array [0..512] of AnsiChar;
|
||||||
|
@ -423,7 +423,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
function IsAppOnNetwork(const ExePath : string) : Boolean;
|
function IsAppOnNetwork(const ExePath : string) : Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (GetDriveType(PAnsiChar(ExtractFileDrive(ExePath) + '\')) = DRIVE_REMOTE);
|
Result := (GetDriveType(PAnsiChar(ExtractFileDrive(ExePath) + '\')) = DRIVE_REMOTE);
|
||||||
|
@ -152,7 +152,7 @@ function UnprotectExe(const FileName : string) : Boolean;
|
|||||||
|
|
||||||
{checksum/CRC routines}
|
{checksum/CRC routines}
|
||||||
procedure UpdateChecksum(var Sum : LongInt; const Buf; BufSize : LongInt);
|
procedure UpdateChecksum(var Sum : LongInt; const Buf; BufSize : LongInt);
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function FileCRC32(const FileName : string) : DWord; {!!.07}
|
function FileCRC32(const FileName : string) : DWord; {!!.07}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
function FileCRC32(const FileName : string) : DWord;//LongInt;
|
function FileCRC32(const FileName : string) : DWord;//LongInt;
|
||||||
@ -259,7 +259,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function IsExeTampered(CheckSize : Boolean) : TExeStatus;
|
function IsExeTampered(CheckSize : Boolean) : TExeStatus;
|
||||||
{-return one of the possible TExeResult states}
|
{-return one of the possible TExeResult states}
|
||||||
var
|
var
|
||||||
@ -374,7 +374,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function ProtectExe(const FileName : string; EraseMarker : Boolean) : Boolean;
|
function ProtectExe(const FileName : string; EraseMarker : Boolean) : Boolean;
|
||||||
{-stamp exe with crc and file size. optionally erase search markers}
|
{-stamp exe with crc and file size. optionally erase search markers}
|
||||||
var
|
var
|
||||||
@ -529,7 +529,7 @@ end;
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function UnprotectExe(const FileName : string) : Boolean;
|
function UnprotectExe(const FileName : string) : Boolean;
|
||||||
{-writes uninitialized signature record. marker must not have been erased}
|
{-writes uninitialized signature record. marker must not have been erased}
|
||||||
var
|
var
|
||||||
@ -660,7 +660,7 @@ begin
|
|||||||
Sum := Sum + Bytes[I];
|
Sum := Sum + Bytes[I];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function FileCRC32(const FileName : string) : DWord; {!!.07}
|
function FileCRC32(const FileName : string) : DWord; {!!.07}
|
||||||
var
|
var
|
||||||
Fh : THandle;
|
Fh : THandle;
|
||||||
|
@ -83,7 +83,7 @@ Notes:
|
|||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
{include the resource compiled using BRCC32.EXE and SRMC.EXE}
|
{include the resource compiled using BRCC32.EXE and SRMC.EXE}
|
||||||
{$R OGSRMGR.R32}
|
{$R OGSRMGR.R32}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -97,7 +97,7 @@ Notes:
|
|||||||
|
|
||||||
{$R-,S-,I-}
|
{$R-,S-,I-}
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
{$H+} {Long strings} {!!.02}
|
{$H+} {Long strings} {!!.02}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ const
|
|||||||
type
|
type
|
||||||
ETpsStringResourceError = class(Exception);
|
ETpsStringResourceError = class(Exception);
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
TInt32 = Integer;
|
TInt32 = Integer;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
TInt32 = LongInt;
|
TInt32 = LongInt;
|
||||||
@ -187,7 +187,7 @@ type
|
|||||||
function GetString(Ident : TInt32) : string;
|
function GetString(Ident : TInt32) : string;
|
||||||
property Strings[Ident : TInt32] : string
|
property Strings[Ident : TInt32] : string
|
||||||
read GetString; default;
|
read GetString; default;
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function GetWideChar(Ident : TInt32; Buffer : PWideChar; BufChars : Integer) : PWideChar;
|
function GetWideChar(Ident : TInt32; Buffer : PWideChar; BufChars : Integer) : PWideChar;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure WideCopy(Dest, Src : PWideChar; Len : Integer);
|
procedure WideCopy(Dest, Src : PWideChar; Len : Integer);
|
||||||
begin
|
begin
|
||||||
while Len > 0 do begin
|
while Len > 0 do begin
|
||||||
@ -479,7 +479,7 @@ end;
|
|||||||
initialization
|
initialization
|
||||||
TpsResStrings := TOgStringResource.Create(HInstance, 'OGSRMGR_STRINGS');{!!.01}
|
TpsResStrings := TOgStringResource.Create(HInstance, 'OGSRMGR_STRINGS');{!!.01}
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
finalization
|
finalization
|
||||||
FreeTpsResStrings;
|
FreeTpsResStrings;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
@ -48,13 +48,10 @@ unit ogutil;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf,lclproc
|
LCLIntf, lclproc
|
||||||
{$IFDEF LINUX} {AH.01}
|
{$IFDEF LINUX} {AH.01}
|
||||||
,BaseUnix
|
,BaseUnix
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF WIN32}
|
|
||||||
|
|
||||||
{$ENDIF} {AH.01}
|
|
||||||
,SysUtils
|
,SysUtils
|
||||||
{$IFNDEF IBO_CONSOLE},Dialogs{$ENDIF} {AH.02}
|
{$IFNDEF IBO_CONSOLE},Dialogs{$ENDIF} {AH.02}
|
||||||
; {!!.08}
|
; {!!.08}
|
||||||
@ -74,7 +71,7 @@ const
|
|||||||
|
|
||||||
const
|
const
|
||||||
{largest structure that can be created}
|
{largest structure that can be created}
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
MaxStructSize = 1024 * 2000000; {2G}
|
MaxStructSize = 1024 * 2000000; {2G}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
MaxStructSize = 1024 * 64 - 1; {64K}
|
MaxStructSize = 1024 * 64 - 1; {64K}
|
||||||
@ -242,7 +239,7 @@ const
|
|||||||
|
|
||||||
function BufferToHex(const Buf; BufSize : Cardinal) : string;
|
function BufferToHex(const Buf; BufSize : Cardinal) : string;
|
||||||
function BufferToHexBytes(const Buf; BufSize : Cardinal) : string;
|
function BufferToHexBytes(const Buf; BufSize : Cardinal) : string;
|
||||||
{$IFNDEF Win32}
|
{$IFNDEF WINDOWS}
|
||||||
function GetDiskSerialNumber(Drive : AnsiChar) : LongInt;
|
function GetDiskSerialNumber(Drive : AnsiChar) : LongInt;
|
||||||
function MyHashElf(const Buf; BufSize : LongInt) : LongInt;
|
function MyHashElf(const Buf; BufSize : LongInt) : LongInt;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -255,7 +252,7 @@ function OgFormatDate(Value : TDateTime) : string; {!!.09}
|
|||||||
|
|
||||||
{file related routines}
|
{file related routines}
|
||||||
function GetFileSize(Handle : THandle) : Cardinal;
|
function GetFileSize(Handle : THandle) : Cardinal;
|
||||||
{$IFNDEF Win32}
|
{$IFNDEF WINDOWS}
|
||||||
function LockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
function LockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
||||||
nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh: DWORD): Boolean;
|
nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh: DWORD): Boolean;
|
||||||
function UnlockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
function UnlockFile(hFile: THandle; dwFileOffsetLow, dwFileOffsetHigh: DWORD;
|
||||||
@ -302,8 +299,9 @@ begin
|
|||||||
Result := Result + ',' + HexStr + IntToHex(Bytes[I], 2);
|
Result := Result + ',' + HexStr + IntToHex(Bytes[I], 2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
(********************** removed (16-bit left-over, does not compile any more)...
|
||||||
{$IFNDEF LINUX}
|
{$IFNDEF LINUX}
|
||||||
{$IFNDEF Win32}
|
{$IFNDEF MSWINDOWS}
|
||||||
type
|
type
|
||||||
PMediaIDRec = ^TMediaIDRec;
|
PMediaIDRec = ^TMediaIDRec;
|
||||||
TMediaIDRec = packed record
|
TMediaIDRec = packed record
|
||||||
@ -408,6 +406,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
*******************************************************************************)
|
||||||
|
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
function MyHashElf(const Buf; BufSize : LongInt) : LongInt;
|
function MyHashElf(const Buf; BufSize : LongInt) : LongInt;
|
||||||
@ -543,7 +542,7 @@ not fully compatible but easier pure pascal version
|
|||||||
to do it multiplatform}
|
to do it multiplatform}
|
||||||
|
|
||||||
(*
|
(*
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure XorMem(var Mem1; const Mem2; Count : Cardinal); register;
|
procedure XorMem(var Mem1; const Mem2; Count : Cardinal); register;
|
||||||
begin
|
begin
|
||||||
asm
|
asm
|
||||||
@ -845,7 +844,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
function RolByteX(I, C : Byte) : Byte; register;
|
function RolByteX(I, C : Byte) : Byte; register;
|
||||||
asm
|
asm
|
||||||
mov cl, dl
|
mov cl, dl
|
||||||
@ -1157,7 +1156,7 @@ begin
|
|||||||
FinalizeTMD(Context, Digest, DigestSize);
|
FinalizeTMD(Context, Digest, DigestSize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF MSWINDOWS}
|
||||||
{!!.05} {added}
|
{!!.05} {added}
|
||||||
function CreateMachineID(MachineInfo : TEsMachineInfoSet) : LongInt;
|
function CreateMachineID(MachineInfo : TEsMachineInfoSet) : LongInt;
|
||||||
{ Obtains information from:
|
{ Obtains information from:
|
||||||
|
@ -47,7 +47,7 @@ Fixme.
|
|||||||
{$S-} {Stack-Overflow Checking}
|
{$S-} {Stack-Overflow Checking}
|
||||||
{$V-} {Var-String Checking}
|
{$V-} {Var-String Checking}
|
||||||
|
|
||||||
{$IFNDEF Win32}
|
{$IFNDEF MSWINDOWS}
|
||||||
{$F-} {Force Far Calls}
|
{$F-} {Force Far Calls}
|
||||||
{$K-} {Smart Callbacks}
|
{$K-} {Smart Callbacks}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
@ -45,6 +45,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF MSWINDOWS} {AH.01}
|
{$IFDEF MSWINDOWS} {AH.01}
|
||||||
Windows, {AH.01}
|
Windows, {AH.01}
|
||||||
|
idesn, { Serial number info from an IDE hard drive }
|
||||||
{$ENDIF} {AH.01}
|
{$ENDIF} {AH.01}
|
||||||
{$IFDEF IBO_CONSOLE}
|
{$IFDEF IBO_CONSOLE}
|
||||||
ConsoleStubs,
|
ConsoleStubs,
|
||||||
@ -52,7 +53,7 @@ uses
|
|||||||
{$IFDEF LINUX} {AH.01}
|
{$IFDEF LINUX} {AH.01}
|
||||||
BaseUnix, {AH.01}
|
BaseUnix, {AH.01}
|
||||||
{$ENDIF} {AH.01}
|
{$ENDIF} {AH.01}
|
||||||
Classes, SysUtils,MD5,
|
Classes, SysUtils, MD5,
|
||||||
ogconst,
|
ogconst,
|
||||||
ogutil
|
ogutil
|
||||||
{$IFNDEF IBO_CONSOLE}
|
{$IFNDEF IBO_CONSOLE}
|
||||||
@ -60,9 +61,6 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF UsingZLib}
|
{$IFDEF UsingZLib}
|
||||||
,ZLib
|
,ZLib
|
||||||
{$ENDIF}
|
|
||||||
{$IFDEF WIN32}
|
|
||||||
,idesn
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -822,7 +820,7 @@ begin
|
|||||||
FinalizeTMD(Context, Digest, DigestSize);
|
FinalizeTMD(Context, Digest, DigestSize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF Win32}
|
{$IFDEF WINDOWS}
|
||||||
{!!.05} {added}
|
{!!.05} {added}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user