NetTalk Central

Author Topic: String Teory Question  (Read 1183 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
String Teory Question
« on: January 04, 2023, 01:15:12 PM »
Exist any function for return a file size in mb? or other any function for this?

thanks

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: String Teory Question
« Reply #1 on: January 04, 2023, 03:42:49 PM »
When you do st.Load() in StringTheory you can then use st.Length().

st.Load() calls this Win32 API (along with others):

stGetFileSize(long hFile,*long SizeHigh), long, pascal, name('GetFileSize')

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfilesize

Just tested loading various files into the StringTheory demo.  Seems st.Length() after st.Load() will do what you need.


"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Jane

  • Sr. Member
  • ****
  • Posts: 348
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: String Teory Question
« Reply #3 on: January 05, 2023, 03:53:45 AM »
Don and Jane Thanks..