I'm reading in my program some files from system32 folder; and one of these files (C:\Windows\System32\gdi32.dll) demonstrates a very strange behavior. When I'm reading it from my program, it shows size of 310'784 bytes; and when I view it's size from Explorer, it shows size of 404'480 bytes. How could that be?
The most likely explanation is that your program is 32-bit and Explorer is 64-bit. When a 32-bit program opens files in C:\Windows\System32 (which contains 64-bit DLLs), it's actually redirected to C:\Windows\SysWOW64 (which contains 32-bit DLLs). The size difference you're seeing is the difference between the C:\Windows\SysWOW64\gdi32.dll and C:\Windows\System32\gdi32.dll files.
For more information, see KB article 896456.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With