Bin2H retro update

Yes, someone out there is still wanting software for Windows 95! So, I produced my first dual-mode 16/32-bit DOS/Windows application.

I was surprised enough to get a user complaining when TFind stopped working on Windows 2000 – three years after Microsoft terminated even extra-cost extended support even for the Server variant – though reverting to building with an older toolchain and adjusting two API calls was enough to restore support.

Then someone complained that Bin2h didn’t run on Windows 95. Microsoft’s own support for Windows 95 ended at the end of 2001, the command line is actually a 16 bit DOS application and much of the operating system is still 16 bit code, limited to handling data in 64k segments – a very different environment from modern flat 32 or 64 bit systems.

Still, there was no real reason Bin2h couldn’t be made to function on older platforms – just how far back could I go and still have a single file? Almost all the way, in fact: because 32 bit Windows applications incorporate a 16 bit “stub” (which normally displays a simple error message, noting that the application in question requires Windows, then exits), it’s possible to combine both 16 and 32 bit code in a single file. The HX DOS extender exploits this duality to great effect.

So, I back-ported the code to plain old 16 bit DOS, then inserted that as the stub component in the existing 32 bit Win32 version and signed the resulting file: a single bin2h.exe which can be used on systems from MS DOS 6.22 (and probably earlier, though I lack a test system for that at present) to 64 bit Windows 8.1, despite the latter having dropped support for 16 bit EXE files entirely.

In case it is useful, the old version remains available, now as old-bin2h.exe – if it is needed or any problems arise, please contact me to let me know.

Despite supporting 1980s MS-DOS, the whole application is still a fully-fledged Win32 application at home on Windows 8.1, complete with cryptographic signature via Verisign: an elegant solution I will document fully in a later post.

Subscribe via FeedBurner Add to Technorati Favorites

blog comments powered by Disqus