Another GetDirectorySize() Procedure (PB4.01)

Share your advanced PureBasic knowledge/code with the community.
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

Rescator wrote:time.l=1
WaitWindowEvent(time)

Using a variable, you can change the variable and WaitWindowEvent() will use the new value on it's next wait.
You're right! Didn't think of this way :)
Athlon64 3700+, 1024MB Ram, Radeon X1600
BarryG
Addict
Addict
Posts: 4122
Joined: Thu Apr 18, 2019 8:17 am

Re:

Post by BarryG »

Hmm, why do both Tranquil and AND51's codes return incorrect results? My "C:\Windows\System32" folder is 6,896,587,636 bytes but both codes says it's 4,543,822,572 bytes.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: Re:

Post by Bisonte »

BarryG wrote:Hmm, why do both Tranquil and AND51's codes return incorrect results? My "C:\Windows\System32" folder is 6,896,587,636 bytes but both codes says it's 4,543,822,572 bytes.
I think you are compiled it with the x86 compiler. There is a difference to the original filesize.
System32 is a system folder with some special rights. x86 (pb)programs can't access all folders.

If I compile it with x64 compiler I get the right filesize.
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Another GetDirectorySize() Procedure (PB4.01)

Post by ChrisR »

and/or disable the redirection to C:\Windows\SysWOW64
Post Reply