The problem with two files

I read several files from the system32 folder in my program; and one of these files (C: \ Windows \ System32 \ gdi32.dll) exhibits very strange behavior. When I read it from my program, it shows a size of 310'784 bytes; and when I look at its size from Explorer, it shows a size of 404'480 bytes. How could this be?

+3
source share
1 answer

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 is actually redirected to C:\Windows\SysWOW64(which contains 32-bit DLLs). The size difference you see is the difference between C:\Windows\SysWOW64\gdi32.dlland C:\Windows\System32\gdi32.dll.

For more information, see KB Article 896456 .

+4
source

Source: https://habr.com/ru/post/1751323/


All Articles