What can I use instead of rundll32.exe to run 64-bit DLL?

Andrey Karpov
Articles: 552

There are two versions of the rundll32.exe program in 64-bit versions of Windows-family operating systems: 64-bit version: %WinDir%\System32\rundll32.exe фтв 32-bit version: %WinDir%\SysWOW64\rundll32.exe.

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 need to address the %WinDir%\System32 folder from a 32-bit program launched in a 64-bit Windows, you may use the virtual directory %windir%\Sysnative (redirection is not used for it) or use the Wow64DisableWow64FsRedirection function to disable the redirection mechanism.

References



Use PVS-Studio to search for bugs in C, C++, C# and Java

We offer you to check your project code with PVS-Studio. Just one bug found in the project will show you the benefits of the static code analysis methodology better than a dozen of the articles.

goto PVS-Studio;

Andrey Karpov
Articles: 552


Bugs Found

Checked Projects
412
Collected Errors
14 132
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →
Accept