0

Is it possible to load a 64-bit dll into a 32-bit process ?
Generally speaking, I know it can not happen.
Yet, maybe there are some exceptions ?

The_Mundane
  • 97
  • 1
  • 1
  • 9
  • Why would there be exceptions? What would those exceptions possibly be? What conditions would create them? On what architecture? – Cody Gray Jan 09 '12 at 11:18

3 Answers3

2

No, and neither a 64-bit process can load a 32-bit DLL.

If you're on a 64 bit OS, you can load the DLL in a 64-bit process and have it communicate with your 32-bit process through IPC.

If you're on a 32 bit OS, you're out of luck.

CharlesB
  • 80,832
  • 27
  • 184
  • 208
0

In .NET, it is possible to load a 64-bit DLL into a 32-bit process for reflection only. For details please check "Analyze 64-bit DLL from within T4 template in Visual Studio (32-bit) using Reflection".

I know that this is a special case, but I thought I'd add it anyway because it might help others looking for a similar solution as me.

Community
  • 1
  • 1
gehho
  • 8,835
  • 3
  • 43
  • 57
-1

But new computer bought today at least have 4G ram. We cannot prevent using 64-bit OS to avoid problem. We must face 64-bit positively! Server 2008 R2 only have 64-bit. Issues around EXE AnyCPU / x86, 32-bit COM / C++ dll must be handled. Ideally compile both 32 and 64 bit COM / C++ dll.

linquize
  • 19,090
  • 9
  • 57
  • 80