Post by andymbody » 28 Aug 2023, 19:05
SKAN wrote: ↑28 Aug 2023, 05:55
Then I suppose @lexikos method is better?
Code: Select all
DllCall("Shlwapi\StrFormatByteSize64A", "Int64",N, "Str",Format("{:16}",N), "Int",16, "AStr")
Yes! This produces exactly the same results as Windows is reporting. I should use this for formatting going forward so that the values are consistent with the Windows properties, if/when I make comparisons, especially during debugging. Was that referenced post yours
@SKAN or
@lexikos ?
SKAN wrote: ↑28 Aug 2023, 08:11
Are you sure?
Seems like only 3 bytes short?
Yes, you are correct... I posted a snapshot that did not reflect the original 409 bytes that I saw in the beginning. Sorry about that. The snapshot was of the edit I made to the file to add characters until I saw the change between 19.8 and 19.9. I think I subtracted a couple characters from that point just before I took the snapshot. Nice catch, BTW.
A Keymaker wrote: ↑28 Aug 2023, 06:02
What about individual programs: can some of them do their own calculations - or do they all relay on what Windows reports to them?
If they so their own, then have you compared end results?
Sorry, I don't think I understand this comment/question... but... if I do... yes, the program does do it's own calculation, and does not rely on Windows for that. But, during testing/debugging, I noticed that my code was not producing the same results that Windows was reporting. I was using Windows reporting as a benchmark to determine whether the code was producing the correct result for that particular function. It wasn't, so I had to investigate, which led to this post.
Thank you
@SKAN ... and everyone!!
Andy
[quote=SKAN post_id=536277 time=1693220158 user_id=54]
Then I suppose @lexikos method is better?
[/quote]
[code]DllCall("Shlwapi\StrFormatByteSize64A", "Int64",N, "Str",Format("{:16}",N), "Int",16, "AStr")[/code]
Yes! This produces exactly the same results as Windows is reporting. I should use this for formatting going forward so that the values are consistent with the Windows properties, if/when I make comparisons, especially during debugging. Was that referenced post yours [mention]SKAN[/mention] or [mention]lexikos[/mention] ?
[quote=SKAN post_id=536298 time=1693228309 user_id=54]
Are you sure? :? Seems like only 3 bytes short?
[/quote]
Yes, you are correct... I posted a snapshot that did not reflect the original 409 bytes that I saw in the beginning. Sorry about that. The snapshot was of the edit I made to the file to add characters until I saw the change between 19.8 and 19.9. I think I subtracted a couple characters from that point just before I took the snapshot. Nice catch, BTW.
[quote="A Keymaker" post_id=536279 time=1693220537 user_id=145978]
What about individual programs: can some of them do their own calculations - or do they all relay on what Windows reports to them?
If they so their own, then have you compared end results?
[/quote]
Sorry, I don't think I understand this comment/question... but... if I do... yes, the program does do it's own calculation, and does not rely on Windows for that. But, during testing/debugging, I noticed that my code was not producing the same results that Windows was reporting. I was using Windows reporting as a benchmark to determine whether the code was producing the correct result for that particular function. It wasn't, so I had to investigate, which led to this post.
Thank you [mention]SKAN[/mention] ... and everyone!!
Andy