Is there an equivalent of rundll32.exe for calling 64-bit DLLs?
A 64-bit application can use the 64-bit version of rundll32.exe located in %WinDir% \System32\ to load 64-bit DLL. But 32-bit programs addressing %WinDir%\System32\ are redirected into %WinDir% \SysWOW64\ for compatibility purposes and therefore they will use the 32-bit version of rundll32.exe.
If you are on Windows 7, on a Windows Explorer, right click on the executable and select Properties. At the properties window select the Compatibility tab. If under the Compatibility Mode section you see Windows XP, this is a 32 bit executable. If you see Windows Vista, it is 64 bit.
If the first DLL in the path is 32 bit and your app is 32 bit, then the DLL load will work. If the app is 64 bit, it will fail to load the DLL and the process will abort. If you want two DLLs to coexist on the system path, you need to give them unique file names.
On 64-bit versions of Windows, two rundll32.exe
programs exist:
C:\Windows\System32\rundll32.exe
C:\Windows\SysWOW64\rundll32.exe
If you are trying to do this from a 32-bit program, you might need to use C:\Windows\Sysnative
or temporarily turn off WoW64 file system redirection. See the Microsoft documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With