[英]Windows DLL Loading : Load A 64 Bit Dll Into a 32 bit Process, Is It Possible?
Most people would say that 64bit under 32bit on windows is impossible.大多数人会说windows上32bit下64bit是不可能的。 However as far as I'm aware Wow64 works by loading a 64bit ntdll, then a 32bit ntdll.
但是据我所知,Wow64 通过加载 64 位 ntdll,然后加载 32 位 ntdll 来工作。 Calling the 64bit dll to issue syscalls.
调用 64 位 dll 发出系统调用。
As shown in the Wow64SystemServiceCall, which is a jump to the _Wow64Transition.如 Wow64SystemServiceCall 所示,它跳转至 _Wow64Transition。
Shouldn't it be theoretically possible to therefore load a 64bit dll, and do some sort of similar transition call between the two layers?因此,理论上是否可以加载 64 位 dll,并在两层之间进行某种类似的转换调用?
Just asking here if this would be theoretically possible, or if i'm wasting my time here.只是在这里问这在理论上是否可行,或者我是否在浪费时间。 Thank you in advance!
先感谢您!
Yes and no.是和不是。 You can't "load" a 64-bit library into a 32-bit process.
您不能将 64 位库“加载”到 32 位进程中。 But the operating system can run interference for you: it can load the library into another process, and supply an IPC interface to utilize it.
但是操作系统可以为你运行干扰:它可以将库加载到另一个进程中,并提供一个 IPC 接口来使用它。
I worked on a project like that in 1995. Visual Basic in those days was 16-bit, and Windows NT 3.51 was 32-bit.我在 1995 年从事过这样的项目。当时的 Visual Basic 是 16 位的,Windows NT 3.51 是 32 位的。 We ported the computation engine from VAX VMS, a 32-bit operating system, and re-created the GUI with VB.
我们从 32 位操作系统 VAX VMS 移植了计算引擎,并用 VB 重新创建了 GUI。 To move data across, Windows provided a "thunking layer".
为了移动数据,Windows 提供了一个“thunking 层”。 VB called an OS function, passing a function name and parameter description.
VB调用了一个OS function,传递了一个function的名字和参数说明。 NT called the 32-bit function on VB's behalf, and returned the data in VB's address space.
NT代表VB调用了32位的function,返回VB地址空间中的数据。 Worked like a charm.
工作起来很有魅力。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.