简体   繁体   English

32位和64位DLL如何链接到相同的C:\ system32 \ kernel32.DLL?

[英]How does 32bit and 64bit DLLs link to the same C:\system32\kernel32.DLL?

我确定64位DLL无法链接到32位DLL。

Wow64 has a file redirector. Wow64有一个文件重定向器。 It has the same named dlls but are stored in the appropriate location. 它具有相同的命名dll但存储在适当的位置。 The concept is explained at http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx 这个概念在http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx上解释。

The %windir%\\System32 directory is reserved for 64-bit applications. %windir%\\ System32目录是为64位应用程序保留的。 Most DLL file names were not changed when 64-bit versions of the DLLs were created, so 32-bit versions of the DLLs are stored in a different directory. 创建64位版本的DLL时,大多数DLL文件名都没有更改,因此32位版本的DLL存储在不同的目录中。 WOW64 hides this difference using a file system redirector. WOW64使用文件系统重定向器隐藏了这种差异。

In most cases, whenever a 32-bit application attempts to access %windir%\\System32, the access is redirected to %windir%\\SysWOW64. 在大多数情况下,只要32位应用程序尝试访问%windir%\\ System32,就会将访问权限重定向到%windir%\\ SysWOW64。 Access to %windir%\\lastgood\\system32 is redirected to %windir%\\lastgood\\SysWOW64. 对%windir%\\ lastgood \\ system32的访问权限被重定向到%windir%\\ lastgood \\ SysWOW64。 Access to %windir%\\regedit.exe is redirected to %windir%\\SysWOW64\\regedit.exe. 对%windir%\\ regedit.exe的访问权限被重定向到%windir%\\ SysWOW64 \\ regedit.exe。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM