为什么Syswow64资料报告为System32下?报告、资料

2023-09-08 10:37:41 作者:k女神经病

我测试Windows服务。该服务code,当它试图删除只有一个文件中读取我在%WINDIR创建失败%\ Syswow64资料,但将记录的例外是:

I am testing a Windows service. The service code fails when it tries to delete a read only file I created in %windir%\SysWOW64, but the exception that is logged is:

访问路径C:\ WINDOWS \ SYSTEM32 \ CanvasImages \ 62230.jpg'是   被拒绝。

Access to the path 'C:\Windows\system32\CanvasImages\62230.jpg' is denied.

我知道64位Windows有一大堆的招数了其关于这两个文件夹套管,并了解了一点吧,但一些精确的异常信息将是不错的。

I know 64 bit Windows has a whole lot of tricks up its sleeve concerning these two folders, and understand a little of it, but some accurate exception info would be nice.

推荐答案

这是一个有点混乱,但Syswow64资料实际上是32位模拟器64位系统。

It's a bit confusing, but SysWOW64 is actually the 32 bit emulator for 64 bit systems.

WOW表示Windows在Windows,而原SYSWOW是16位模拟器32位Windows(和应该被称为SysWOW32)。所以Syswow64资料是32位模拟器64位Windows。

WOW stands for "Windows on Windows", and the original SysWOW was the 16 bit emulator for 32 Bit Windows (and should have been called SysWOW32). So SysWOW64 is the 32 bit emulator for 64 bit Windows.

所以,当你运行32位应用程序,它使用Syswow64资料来模拟32位注册表和32位重定向(到了Program Files(x86)的举例)。

So, when you run 32 bit applications, it uses SysWOW64 to emulate the 32 bit registry, and 32 bit redirection (to Program Files (x86) for instance).