winevdm ports a 16-bit Windows emulator to run Win16 programs on 64-bit Windows

The GitHub project winevdm (github.com/otya128/winevdm) describes itself as an altered version of winevdm, a 16-bit Windows emulator, ported to 64-bit Windows. Its headline promise is running 16-bit Windows software (the title line names Windows 1.x, 2.x, 3.0, 3.1 and so on) on a 64-bit Windows system. The README says that once the program is installed, "You can execute Win16 binaries directly!"
Setup is short. You download the program or compile it, then run the "install" shortcut, or right-click install.inf and choose "Install". After that you drag and drop a Win16 executable onto otvdm.exe, or run otvdmw.exe. If you get an error that VCRUNTIME140.dll is missing, the README says to install the Microsoft Visual C++ Redistributable for Visual Studio 2017 (32-bit). If Windows Update initializes the registry, the install procedure has to be repeated. The program can be removed by running uninstall.reg, and settings live in otvdm.ini. The page also links a "Download latest version (unstable)".
Building from source has two routes. One is to install Visual Studio 2017, edit PropertySheet.props and compile. The other is the command-line route: git clone the repository, create a build directory, then run cmake .. and make.
The README then lists what the program contains. The CPU emulator is there because 64-bit Windows cannot modify the LDT: the call NtSetInformationProcess with ProcessLdtInformation always returns an error. A second item is wine-based Win16 to Win32 conversion code, where relay routines from 16-bit to 32-bit are autogenerated by a tool called convspec; the README shows one example, a DestroyWindow16 wrapper that calls the 32-bit DestroyWindow. The other items are DOS emulation for Win16, conversion between 16-bit and native HANDLE values, and fixes for compatibility problems.
Two behaviours are worth knowing. When 64-bit Windows detects a 16-bit installer, it has a mechanism to start an alternative installer that is not 16-bit, and this program uses that mechanism. And because some Win16 programs try to save settings in %WINDIR%
The command line form is winevdm.exe [--app-name app.exe] command line, for example winevdm.exe CALC.EXE. The program can also run DOS executables in a DOS-emulator-like way, and the DOS version can be set with the VDMDOSVER environment variable. The README is candid that DOS emulation is incomplete and recommends DOSBox or MS-DOS Player instead.
Key facts
- winevdm is described as an altered version of a 16-bit Windows emulator, ported to 64-bit Windows so Win16 executables can be run directly.
- Usage: install via the "install" shortcut or install.inf, then drag a Win16 executable onto otvdm.exe or run otvdmw.exe.
- A CPU emulator is included because 64-bit Windows cannot modify the LDT; NtSetInformationProcess with ProcessLdtInformation always returns an error.
- Win16 programs that write INI files to %WINDIR% are redirected, since recent Windows does not allow saving there.
- DOS executables can run too, but the README says DOS emulation is incomplete and recommends DOSBox or MS-DOS Player.
Why it matters
64-bit Windows cannot modify the LDT, so Win16 programs do not simply run there. The README's answer is to emulate the CPU and translate Win16 calls to Win32 using wine-based conversion code, with relay routines autogenerated by convspec. The result, per the README, is that you can launch old Win16 binaries directly on a 64-bit system.
Who it affects
People who want to run 16-bit Windows programs (the title line names Windows 1.x, 2.x, 3.0 and 3.1 as examples) on a 64-bit Windows machine, and anyone interested in how such compatibility layers are built. The README also points DOS users to DOSBox or MS-DOS Player rather than this tool.
How to use it
Download or compile the program, then run the "install" shortcut or right-click install.inf and select "Install". Drag a Win16 executable onto otvdm.exe or run otvdmw.exe, or use the command line: winevdm.exe [--app-name app.exe] command line. If VCRUNTIME140.dll is missing, install the Microsoft Visual C++ Redistributable for Visual Studio 2017 (32-bit). To compile, install Visual Studio 2017, edit PropertySheet.props and build, or use git clone, a build directory, cmake .. and make. Uninstall by running uninstall.reg; configuration is in otvdm.ini. If Windows Update initializes the registry, repeat the install procedure.
How solid is it
The only source is the project README. The page marks its latest download as "unstable". The README gives no benchmarks, performance figures or list of supported or tested Win16 programs, and it does not say which 64-bit Windows versions are supported. The title line lists Windows 1.x, 2.x, 3.0 and 3.1 as examples ("etc."); the text does not say which versions actually work.
Risks and caveats
The README states that DOS emulation is incomplete. The latest download is labelled unstable, and the page does not explain what that means. Windows Update can reset the registry state and force a reinstall. Programs that write to %WINDIR% depend on the program's redirect of INI saves.
“You can execute Win16 binaries directly!”
— winevdm README