Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rundll32.exe equivalent for 64-bit DLLs

Tags:

Is there an equivalent of rundll32.exe for calling 64-bit DLLs?

like image 910
edotan Avatar asked Jan 16 '11 03:01

edotan


People also ask

How do I run a 64-bit DLL?

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.

How can I tell if an exe DLL is 32-bit or 64-bit?

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.

What is the difference between 32-bit and 64-bit DLL?

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.


1 Answers

On 64-bit versions of Windows, two rundll32.exe programs exist:

  • 64-bit: C:\Windows\System32\rundll32.exe
  • 32-bit: 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.

like image 152
PleaseStand Avatar answered Nov 17 '22 04:11

PleaseStand