為什麼system32中放的是64位dll,syswow64中放的是32位dll

轉載自:

http://cncc.bingj.com/cache.aspx?q=syswow64+system32+differenece&d=4721794509439110&mkt=en-US&setlang=en-US&w=DI2qviw609tjOQYxCwxoKnALrhb4APj-

摘取其中重要的兩段:

1System32 and SysWOW64

On a 32-bit computer, all 32-bit programs store their files in C:\Program Files, and the system-wide library location is C:\System32.

On a 64-bit computer, 64-bit programs store their files in C:\Program Files, and the system-wide C:\Windows\System32 folder contains 64-bit libraries. 32-bit programs store their files in C:\Program Files (x86), and the system-wide folder is C:\Windows\SysWOW64.

This is definitely counterintuitive. Despite the “32” in the name, the System32 folder contains 64-bit libraries. And, despite the 64 in the name, the SysWOW64 folder contains 32-bit libraries—at least on 64-bit versions of Windows.

In general, you won’t need to know this. The Windows operating system and programs you use automatically place their files in the correct location and use the correct folder. However, if you ever need to manually install a DLL file in the correct location or find where one is installed—which is very rare—you’ll need to know which is which.

#############################################################################################

So Why Is System32 64-bit, and SysWOW64 32-bit?

All that brings us back to the million-dollar question: Why is the “System32” folder 64-bit, and SysWOW64 32-bit?

The answer seems to be that many 32-bit applications were hardcoded to use the C:\Windows\System32 directory. When developers recompiled these applications for 64-bit versions of Windows, they continued to use the C:\Windows\System32 directory.

Rather than renaming the directory and forcing developers to move to the new one, breaking many applications in the process, Microsoft left “System32” as the standard system library directory. They created a new library directory for applications running under the WoW64 layer, which they named “SysWOW64”. When you think about it this way, the name makes more sense.

 

大意是:

32位程序裡面“C:\Windows\System32”是寫死的,為了重編譯到64位時省事,就索性決定讓system32位裡面的dll都是64位的

言外之意就是:32->64位時,懶得改,導致system32為了滿足開發習慣,都是放置的64位的dll

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值