Delphi Check File Size

Posted on by admin

Quote In article, Pm wrote: How can I get the size of a file that is bigger than 2GB? So far I have used the TSearchRec when getting the size of a file, but now I need a function that can return the size in Int64.TSearchrec has a member named Finddata, which is an API record containing alot of additional information, among it the full 64 bit size of the file. Lookat the topic for WIN32FINDDATA in win32.hlp for a description of this record.There is a type in windows.pas that can be used to combine two DWORDS into anint64:ULARGEINTEGER = recordcase Integer of0: (LowPart: DWORD;HighPart: DWORD);1: (QuadPart: LONGLONG);end;LONGLONG is an alias for int64.-Peter Below (TeamB)Use the newsgroup archives:http://www.mers.com/searchsite.htmlhttp://www.tamaracka.com/search.htmhttp://groups.google.comhttp://www.prolix.be. Quote In article, Pm wrote: How can I get the size of a file that is bigger than 2GB? So far I have used the TSearchRec when getting the size of a file, but now I need a function that can return the size in Int64. TSearchrec has a member named Finddata, which is an API record containing a lot of additional information, among it the full 64 bit size of the file.

Weeze

  1. Delphi Check File Size Download Ps4
Delphi Check File SizeDelphi check file sizes

Delphi Check File Size Download Ps4

Look at the topic for WIN32FINDDATA in win32.hlp for a description of this record. There is a type in windows.pas that can be used to combine two DWORDS into an int64: ULARGEINTEGER = record case Integer of 0: ( LowPart: DWORD; HighPart: DWORD); 1: ( QuadPart: LONGLONG); end; LONGLONG is an alias for int64. Quote Hi!I'm not the most experienced Delphi user (I'm a computer sciencesstudent) and I tryed to understand WIN32FINDDATA to got a size (inBytes) over 2GB.I used://.Starttype TDirInfo = Record Files: LongWord; Dirs: LongWord; Size: Int64; //Can only take up to 2GB end;snipHaven't looked in detail at your code, but Int64 goes to 2^63. 2Gb is2^31.In D5+smallint: signed: 1 byte: max 127byte: unsigned: 1 byte: max 255shortint: signed: 2 bytes: max 32767word: unsigned: 2 bytes: max 65535longint: signed: 4 bytes: max 2^31-1 = 2Gb-1 (=integer)cardinal: unsinged: 4 bytes: max 2^32-1 = 4Gb-1int64: signed: 8 bytes: max 2^63-1So your error is not in using the int64.Good luckBernard HillBraeburn SoftwareAuthor of Music Publisher systemMusic Software written by musicians for musiciansScotland4+44 1750 21854.