Recent

Author Topic: Problem converting for Delphi code for dealing with 64bit file dates  (Read 9265 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?

This is a follow up to http://forum.lazarus.freepascal.org/index.php/topic,8902.0.html.

The TULargeInteger used by Lazarus does not appear to support the record members for the LowPart and HighPart. What are the Lazarus equivalents?

Code: [Select]
function TVersionInfo.GetFileDate: int64;
var
  LargeInteger: TULargeInteger;
begin
  if (Valid) and (FFileInfo <> nil) then
  begin
    LargeInteger.LowPart := FFileInfo.dwFileDateLS;
    LargeInteger.HighPart := FFileInfo.dwFileDateMS;
    Result := LargeInteger.QuadPart;
  end else
    Result := 0;
end;

   
Lazarus 3.0/FPC 3.2.2

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Problem converting for Delphi code for dealing with 64bit file dates
« Reply #1 on: March 14, 2010, 10:18:15 pm »
(I don't see the relation to the other report?)

Anyway, it is hard to reproduce without a complete compilable program (preferably a simple console app without lazarus dependancies) to reproduce.

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
Re: Problem converting for Delphi code for dealing with 64bit file dates
« Reply #2 on: March 14, 2010, 11:04:32 pm »
It is another part of the same unit and  I have attached the project here.
I haven't gotten round to doing console only apps yet, the form is the application default form.

(I don't see the relation to the other report?)

Anyway, it is hard to reproduce without a complete compilable program (preferably a simple console app without lazarus dependancies) to reproduce.
Lazarus 3.0/FPC 3.2.2

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Problem converting for Delphi code for dealing with 64bit file dates
« Reply #3 on: March 15, 2010, 12:10:53 pm »
(T)ULARGE_INTEGER has been changed to the native 64-bit type QWORD  (unsigned 64-bit). I assume to fix a different kind of usage in headers. (but it is there since SVN rev 1).

"LARGE_INTEGER" still works with lowpart and highpart.



 

TinyPortal © 2005-2018