mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-20 19:32:38 +02:00
* GetFileHandle(), THandleStream: changed type that is used to store file handle from Integer to THandle, so it can be redefined to 64 bits on certain platforms, see http://lists.freepascal.org/lists/fpc-devel/2010-November/023019.html
git-svn-id: trunk@16383 -
This commit is contained in:
parent
eb698a6d9a
commit
907e7a32d5
@ -842,16 +842,16 @@ type
|
||||
|
||||
THandleStream = class(TStream)
|
||||
private
|
||||
FHandle: Integer;
|
||||
FHandle: THandle;
|
||||
protected
|
||||
procedure SetSize(NewSize: Longint); override;
|
||||
procedure SetSize(const NewSize: Int64); override;
|
||||
public
|
||||
constructor Create(AHandle: Integer);
|
||||
constructor Create(AHandle: THandle);
|
||||
function Read(var Buffer; Count: Longint): Longint; override;
|
||||
function Write(const Buffer; Count: Longint): Longint; override;
|
||||
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
|
||||
property Handle: Integer read FHandle;
|
||||
property Handle: THandle read FHandle;
|
||||
end;
|
||||
|
||||
{ TFileStream class }
|
||||
|
@ -409,7 +409,7 @@ end;
|
||||
{* THandleStream *}
|
||||
{****************************************************************************}
|
||||
|
||||
Constructor THandleStream.Create(AHandle: Integer);
|
||||
Constructor THandleStream.Create(AHandle: THandle);
|
||||
|
||||
begin
|
||||
FHandle:=AHandle;
|
||||
|
@ -99,6 +99,6 @@ Function FileSearch (Const Name, DirList : String; ImplicitCurrentDir : Boolean
|
||||
Function ExeSearch (Const Name, DirList : String) : String;
|
||||
Function FileIsReadOnly(const FileName: String): Boolean;
|
||||
|
||||
Function GetFileHandle(var f : File):Longint;
|
||||
Function GetFileHandle(var f : Text):Longint;
|
||||
Function GetFileHandle(var f : File):THandle;
|
||||
Function GetFileHandle(var f : Text):THandle;
|
||||
|
||||
|
@ -317,13 +317,13 @@ begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
Function GetFileHandle(var f : File):Longint;
|
||||
Function GetFileHandle(var f : File):THandle;
|
||||
|
||||
begin
|
||||
result:=filerec(f).handle;
|
||||
end;
|
||||
|
||||
Function GetFileHandle(var f : Text):Longint;
|
||||
Function GetFileHandle(var f : Text):THandle;
|
||||
begin
|
||||
result:=textrec(f).handle;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user