rundll32.exe equivalent for 64-bit DLLs - win64

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

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.

Related

Unexpected error with mona.py on x64

My operating system is Windows 10. I configured Mona with WinDbg according to the documentation on the website.
I can use Mona with WinDbg x86. But in WinDbg x64 it says:
0:000> .load pykd.pyd
0:000> !py mona
unexpected error
Could anyone please tell me how to solve it?
Do you have a 2.7.11 python? It has the known bug: python can not be initialized in embedded mode on the Windows ( x86 and x64 both ). See http://www.hexblog.com/?p=949.
I recommend you use 2.7.10.
And I don't recommend you use mona.py in x64 windbg, it can not work properly nor with x64 application nor with wow64 application.

NetBeans terminal window is gray and won't accept characters

I am running NetBeans 8.0.2 on a 64-bit Windows 7 PC. I was trying to follow Geertjan Wielenga's instructions for getting up and running with Scala in NetBeans 8.x.
The first instruction starts, "In the Terminal window, ..." so I selected Window > IDE Tools > Terminal. Instead of being a useable terminal window, the tab's content area was completely gray. I noticed that there seemed to be text flashing in the window before it went gray, so I clicked on the "Create New Local Terminal Tab" button multiple times until I was able to read the disappearing text:
Unable to start pty process
Searching for this phrase yielded results for C/C++ projects and the "Run" command, but I'm not doing a C/C++ project. How can I get the terminal window to a state where I can interact with it?
The NetBeans Terminal Emulator requires Cygwin. Importantly, the bitness of NetBeans must match the bitness of Cygwin. If you are using a 64-bit version of NetBeans, then you must use a 64-bit version of Cygwin; likewise 32-bit and 32-bit.
This comment by Andrew Krazny on NetBeans bug 234221 says:
A bitness of jdk/netbeans is important. Possible options are:
32-bit NB and only 32-bit cygwin is installed
32-bit NB and only 64-bit cygwin is installed
32-bit NB and both 32/64-bit cygwin are installed
64-bit NB and only 32-cygwin is installed
64-bit NB and only 64-cygwin is installed
64-bit NB and both 32/64-bit cygwin are installed
Cases 1) and 5) are 'ideal' - in this case everything should work and it is highly recommended that bitness of NB/cygwin match. This means that if one tries to use cygwin64 (s)he should install 64-bit java and run 64-bit version of NetBeans (netbeans64.exe).
Case 2) is almost nonfunctional. It requires cygwin64/bin to be in %Path%; compilation will work, but run is possible in 'External Terminal' only.
Case 3) NB will detect 32-bit cygwin and will use it by default. IF user tries to add cygwin64 as a toolchain and compile his code in 64-mode, run in 'Output Window' will not work. 32-bit toolchain is OK in this case
Case 4) is almost nonfunctional. It requires cygwin/bin to be in %Path%; compilation will work, but run is possible in 'External Terminal' only.
Case 6) 64-bit compilation/run will work, 32-bit run will fail.
In my case, I was using 32-bit Cygwin with 64-bit NetBeans. I installed 64-bit Cygwin, added a CYGWIN_HOME environment variable, and added %CYGWIN_HOME%\bin to the end of my path¹, and now I have a functioning terminal window.
¹which I hate doing because there are command names that overlap

Installing WinDbg 32-bit on a 64-bit system

I've installed WinDBG on Windows 7 64-bit, however, I want to install the 32 bit version, not the 64 bit version.
I found this link on the internet:
https://social.msdn.microsoft.com/forums/windowsdesktop/en-us/cd004535-75f1-48ee-9176-574b344ddce1/how-to-install-windbg-32bit-on-64bit-system
Following the accepted answer, I do not have that path on my computer.
I have:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Redist
However, there is no "Debugging Tools for Windows" folder in that direcotry like the answer says, only the VC folder. WinDBG is installed and working.
What can I do? Thanks.
You could download Windows SDK ISO file (https://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx) and install 32bit version from there. Also you could use !wow64exts.sw command to debug win32 process or dump using x64 version.

Is it possible to create a 32bit standalone executable on a 64bit machine?

I'm creating a standalone executable from MATLAB .m file using mcc.
My machine is a 64bit machine and the target machine is 32bit machine, is it possible to create such an application (and to be able to run it on the target machine of course)?
Probably the simplest way to do this is to install the 32 bit version of MATLAB and use the mcc from that installation.
Don't worry about the warnings that you get about installing 32 bit MATLAB on 64 bit Windows. It works just fine. I have lots of different versions of MATLAB installed on my machine for development purposes, both 32 and 64 bit, all happily co-existing side by side.
The documentation also mentions a -win32 option that can be passed to mcc:
-win32 Run in 32-Bit Mode
Use this option to build a 32-bit application on a 64-bit system only
when the following are both true:
You use the same MATLAB installation root (matlabroot) for both 32-bit and 64-bit versions of MATLAB.
You are running from a Windows command line (not a MATLAB command line).
Since you have to install 32 bit MATLAB, no matter what, it seems to me that it's just easier to run the 32 bit mcc directly.

Scripting 16-bit DOS Binaries on 64-bit Windows via a command-line VM?

I know that this is possible in principle, but the tools may not exist to do it:
Rather than booting up XP-Mode or some other VM to use Leydesforff's tools (http://www.leydesdorff.net/indicators/index.htm), I'd like a very thin command-line vm that I can use to just run a single 16-bit .exe file and pass input back and forth, i.e.:
vm.exe "oldthing.exe" -options ...
Or, any other way that I can write scripts (.bat, python, something like that) using these 16-bit .exe files that I can run on my Win7 x64 machine...
If they are DOS programs you can run them in DOSBox. It is a DOS/16bit x86 emulator writing primarily for games, but it should run any DOS application.
You can start it with a command line option indicating which application you want to run in DOSBox:
C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"