Win32s version tour…

Well I’ve managed to track down quite a few versions of Win32s from my various compiler CD’s So I figured it’d be somewhat interesting to run down a ‘tour’ of some of the significant versions starting with the first.

Now Microsoft Knowledge base article, KB121091 tells you which version of the win32s subsystem is installed by checking the win32s.ini or the version stamp of the WIN32S16.DLL file. Which for the most part is pretty simple. However the first version of Win32s that I could find doesn’t include either.

Win32s from October 1992.

I got this from the Windows NT October 1992 Win32 SDK. Keeping in mind that Windows 3.1 shipped in April of 1992 it’s kind of note worthy that already in October there is already a working win32s upgrade for Windows. I’d describe this release a a ‘core’ only version as all the win32s programs I have failed to run on this version. Mostly because this version lacks WINMM.DLL (the Multimedia library from NT), although the October 1992 Windows NT beta does include this dll, along with soundblaster/AdLib support!

Windows 3.1 - win32s 1992 running nt october 1992 appletts

Windows 3.1 – win32s 1992 running NT October 1992 applets

I was able to get a few of theapplets from Windows NT October 1992 running on this version of Win32s by simply expanding and copying them over.. The font selection for the digital clock was messed up, but the analog version worked fine. As you can see I got clock, freecell, notepad, solitaire and winver running. Needless to say the build 34326 is totally incorrect.

For anyone that wants to play with it, the 1992 version of Win32s is available here.

The next, and final beta from March of 1993. This one does identify itself as being build 61, which is not on the list.

Windows-3.1-win32s-March-1993-running-nt-october-1992-appletts

Windows 3.1 win32s from March 1993 running NT October 1992 applets

It’s compatibility is about par with the 1992 version, but the winver reports Windows NT version 63.10 … I’ve made it available here.

I was unable to find any 1.0 versions of Win32s. Googling around, it would appear that MathCad 4.0 shipped with the 1.0 runtime. If anyone has Mathcad 4.0 I’d love a copy of it’s Win32s 1.0!

From the same InfoWorld article, 1.1 shipped the same time as Windows NT 3.1, and 1.0 was another ‘pre-release’. But I do have to say that 1.1 includes quite a number of great utilities, and tools, unlike the other development versions.

Win32s 1.1

Win32s 1.1

Win32s 1.1 dev features

Win32s 1.1 dev features.

That’s right, this developer version includes the CLI Visual C++ compiler (Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 8.00), along with a profiler, and codeview debugger! Also included is a demo version of the Pharlap TNT Dos Extender, which is restricted to no user DLL’s and 2MB of RAM. Although if anyone really wants a kick ass Dos Extender, use the excellent, and FREE HX Dos Extender

Once WinG is installed, Lemmings will run on 1.1, while WinDoom fails because the procedure CreateDIBSection does not exist in this version of Win32s. Which really isn’t that surprising as version 1.1 is at parity with Windows NT 3.1, and that call didn’t get implemented until Windows NT 3.5 . Another fun thing is that because of the segmentation in Windows 3.1 it seems that a lot of stack ‘issues’ and other memory collisions are found much easier under Win32s then under Windows NT (and it’s siblings). At any rate, you can find this version of Win32s here.

Next is version 1.20 which includes support for OLE 2.0 . This brings Win32s up to the level of Windows NT 3.5 . And it allows more NT applications to run on Windows 3.1, including Word 6.0 for Windows NT. The development copy of Win32s 1.20 can be found here, along with the retail version here.

The developers version of 1.25 is on the Visual C++ 2.2 disc, but it lacks dev tools and debuggers from 1.10!  The retail copy of 1.25 with OLE2 support. There apparently was some major bugs with 1.25, and there is also the all important 1.25a update, which I’ve been able to track down both the retail and the retail + OLE2 versions. I don’t have any development versions of 1.25/1.25a so no debug symbols.

And finally I was able to track down Win32s 1.30a both retail OLE 2 & the development version, along with the final version of Win32s 1.30c, development and retail OLE 2.0.

Win32s 1.30 included a Windows 95 compatible help engine. I would imagine it included some level of compatibility for Windows 95 applications too.

Of all the versions, I’ve found that 1.25a is the most well behaved, but at the same time, I’m lacking the debug build of it… I should also point out gabby.de has a great info page on various applications that’ll run on Win32s.

** As a note from the future it turns out that 1.30c build 172 can play nicely under Qemu, it turns out to need a fix, from Roy as mentioned down below.  “I can patch all 1.30.xxx versions by replacing “66 83 EF 04 E3 3B” with “66 83 EF 04 EB 3B” in win32s16.dll“.  Super thanks for that!  I mirrored the fix here.

8 thoughts on “Win32s version tour…

  1. I’d read this comment about Win32s 1.1 including compilers before, and went out to take a closer look.

    Obviously development tools have historically shipped with Win32s development components. These aren’t really part of Win32s (they’re not redistributable), they’re part of the development tools. The screenshot above was presumably “Visual C++ Win32s components”, and the idea that Visual C++ includes a compiler is somewhat less shocking than Win32s including a compiler.

    The thing that was a bit strange in this to me is that the Win32 SDK for NT 3.1 includes support for Win32s 1.1, but includes an NT-only version of C/C++ 8.0 (and some other Win32 development bits like later releases.) Visual C++ 1.1 32 bit edition included support for Win32s 1.1, and includes C/C++ 8.0, but these binaries are special hybrids – they’re still PE binaries but they are also linked against Phar-Lap such that they can execute on DOS (presumably a chunk of the initial code is a run-time linker that resolves Win32 exports to shim versions that communicate with DOS.) It’d be nice to have access to that layer generically to allow for 3.1 hosted command line tools that are source compatible with Win32, but I don’t think that ever happened. (That said, I’ve never really messed around with Phar-Lap to see what it can do.)

    Because the whole point of Win32s was to ensure that identical binaries could run on 3.1, these compilers when coupled with the exact same headers and libs as the NT compilers become functional on 3.1. So just to confirm, did your copy of this also come from Visual C++ 32-bit 1.1?

    Note though that the compilers really can’t be Win32s, because it didn’t have any command prompt support, because 3.1 had no concept of a command line Windows process, only DOS processes. And for the same reason, binaries generated from the compilers can’t execute from the DOS window, so compiling and executing code becomes clumsy.

    As far as I can tell, only a single release did this (Visual C++ 2.0 just seems to go back to pure PE binaries.) I never had the packaging for 1.1 32 bit, only the CD, but I’m curious how this was messaged to customers. 2.0 and later included 16 bit versions of Visual C++ for 16 bit development; it looks like 1.1 started life with a goal of creating 32 bit binaries on either 3.1 or NT, and somewhere along the line the IDE became NT only, and the resulting fully functional toolchain on 16 bit de-emphasised. Although the CD layout doesn’t show it, the 3.1 support is really just a subset of the exact same tools as the NT support (just fewer files.) Today NT feels like a much better development host if only because its “true” command prompt support meant it could support arbitrary window sizes with a buffer as opposed to 3.1’s 80×25 emulation of VGA hardware rendered into a window, and NT’s ability to execute Win32 programs from its command line, etc.

    One other detail I noticed is that Win32s doesn’t appear to enforce minimum OS version. In hindsight it’d seem natural for Win32s 1.1 to only try to execute 3.10 binaries, and 1.2 to execute 3.10 or 3.50 binaries, etc. But the consequence of this is from Win 3.1 it’s possible to generate binaries Win32s 1.1 binaries stamped as 4.0 and give them a native Win95 appearance (on 95) while still functioning on 3.1. These binaries won’t run on NT 3.1 or 3.5, but the 3.1+95 scenario is still interesting. On a related note, 95 shipped with a few (16-bit) tools where it re-stamps the version field of the binary so that they appear 95 like when run from 95 but can also run from its 3.1-based installer, which is an interesting path to produce some truly “run anywhere” code.

    Nonetheless, this is another entry in the long list of “if I had this at the time and knew what to do with it, it would have been really useful.” If I could go back in a time machine and in 1993 generate true 32 bit binaries that I could develop from 3.1 that target 3.1 but seamlessly migrated to 95 it’d be super cool. Today I’m not sure I’d ever want to use 3.1 as a 32 bit development host given the clear superiority of NT for the task and that it runs better on today’s hardware and emulators, so this becomes yet another historical footnote.

    • It’s part of Visual C++ 1.0 for Windows NT, there is a MSVC32S directory, which yes does contain command line tools for explicitly targeting Win32s.

      It includes Pharlap TNT, to let you run them directly on MS-DOS or under a DPMI host like Windows 3.1. You can find a copy if you want to check it out on WinWorld PC if you want to check out the Microsoft Visual C++ 1.0 for NT distribution. Obviously it’ll work best from a MS-DOS based machine/VM with Windows 3.1 I’m pretty sure that the difference in tools between the Win32s & Win32 (NT) versions is simply that the Win32s have all been stubbed and tagged with Pharlap TNT.

      There were compilers that actually ran on Windows 3.0 and Windows 3.1, QuickC for Windows 1.0 was my favorite compiler of the era as it was on a mere 4 disks, and included support for Windows, & MS-DOS. A long long while ago I had used it to build the F2C (Fortran to C) compiler, and all the components of it’s support library, but just glued the lib & exe directly together, which works just fine… Although by the time NT 3.1 had finally shipped, I had picked up and moved to Watcom C/C++ 10.0 which offered a far more rich target environment than the Microsoft compilers.

      I was surprised that more people didn’t track Win32/Win32s, as it was incredible to finally move into the 32bit era, if even by a Windows extender. Granted Watcom had one that worked for Windows 3.0 although those pre 10.0 versions were very expensive.

Leave a Reply