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: 3294
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: 1226
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.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
ChrisR
Addict
Addict
Posts: 1127
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