Calling LoadLibrary on a 64-bit dll from a 32-bit process

Spilly picture Spilly · Mar 18, 2010 · Viewed 7.5k times · Source

I have a 32-bit exe that needs to dynamically load a 64-bit dll when it detects that the operating system is 64-bit. Is this possible through LoadLibrary? If not, is there another way to accomplish the same goal?

Answer

Jaxidian picture Jaxidian · Mar 18, 2010

As previously mentioned, 32-bit code cannot load 64-bit code in the same process. You'll have to load it into a different process (CreateProcess() ?) and use IPC to coordinate.