The x86 executable is fully supported on the x64 host. For instance. any EXE that you compile in 32-bit mode will work without problems on a 32-bit and 64-bit host. If you donβt know why a 64-bit executable is needed, you probably wonβt do it, so a 32-bit executable is enough.
However, the DLL is another matter. The architecture of the DLL (32-bit or 64-bit) must correspond to the executable file in which the DLL will be used. For instance. if you write a Windows Explorer extension for Windows x64, explorer.exe will be 64-bit, so your DLL must also be 64-bit, otherwise it cannot be loaded.
It is not possible to combine two different architectures into one DLL or EXE on Windows. Thus, you will need two DLLs if you need to support both 32-bit and 64-bit hosts.
source share