windows - 为什么 64 位进程不能使用 32 位 dll?

标签 windows winapi dll 32bit-64bit

在这篇文章中,我将讨论使用 C++ 和 Win32 API 创建的 native Windows 应用程序和 DLL。

来自帖子 Can I load a 32 bit DLL into a 64 bit process on Windows?我了解到64位进程不能直接使用32位DLL。解决此问题的一种方法是在 32 位进程中托管 DLL 并使用某种形式的 IPC。 既然如此,这背后的原因是什么? 为什么 64 位进程不能使用 32 位 DLL? 难道是x86和x64指令集的区别?

最佳答案

如果传递给 32 位代码的地址有任何高于第 32 集的位,它将由于指针大小不匹配而丢失,并且很可能导致 AV。

关于windows - 为什么 64 位进程不能使用 32 位 dll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19191661/

相关文章:

windows - 解析输出时如何纠正变量覆盖错误行为?

windows - GetRawInputDeviceInfo 在 Windows XP 中返回错误的 USB HID 设备名称语法

dll - DLL函数上的Haskell外部导入stdcall

c# - 如何卸载已加载的程序集

windows - UWP - 从基页 C# 继承

c# - Windows - 以编程方式检查系统硬件上是否可以托管 WLAN 网络

c# - 如何显示 Windows 登录对话框?

python - Windows的这个符号链接(symbolic link)遍历代码有什么问题吗?

c++ - VS2012 错误 : The application was unable to start correctly (0xc000007b)

php - 在 Windows 上列出包含 Unicode 字符的目录