IBM Support

Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?

Question & Answer


Question

When do we need to place a file under C:\Windows\System32 or C:\Windows\SysWOW64, on a 64-bits windows system

Cause

Backwards compatibility reasons. A whole lot of applications assume things they shouldn't assume and hard-code paths. And yes, that includes 64-bit applications. So on 64-bit Windows the folder system32 actually contains the 64-bit versions of DLLs. For the 32-bit DLLs there is the folder SysWoW64 which is what 32-bit applications see as system32.

Answer

Microsoft does things backwards sometimes, and this is yet another example of this. System32 is the 64-bit Windows system directory and SysWOW64 is the 32-bit Windows system directory — entirely the opposite way around to what the directory names would suggest.

In Windows, there is a "Windows" directory and a "System" directory, and this has been true all of the way back to when Windows was 16-bit.
Windows programs are supposed to locate them using system API functions such as SHGetKnownFolderPath() and GetSystemDirectory(); and if everyone had done that the world would be quite different at this point. But too many people foolishly hardwired the actual name of the directory, \Windows\System32, into their programs, and then ported those programs from 32-bit Windows to 64-bit Windows. As a consequence, a whole lot of programs were looking for 64-bitexecutables and libraries in the \Windows\System32 directory, whose name they had hardwired. (Ironically, there was the same issue when migrating from 16-bit Windows to 32-bit Windows. The 16-bit "System" directory was \Windows\System, usually.)

So the people at Microsoft chose to make \Windows\System32 the directory that native, 64-bit, Windows programs would find the 64-bit executables and libraries in, and, since 32-bit programs run on top of a shim layer anyway in 64-bit Windows, accesses to the "System" directory by 32-bit programs are redirected to a new \Windows\SysWOW64 directory.

[{"Product":{"code":"SSULQD","label":"PureData System for Analytics"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Tools","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 October 2019

UID

swg22013638