Windows Libraries for OS/2: Difference between revisions

From DisNCord Community Wiki
Jump to navigation Jump to search
(Added reference to IBM PSD)
(Added TODO for development section)
Line 9: Line 9:


No later version is known to exist, and most likely it doesn't, since IBM and Microsoft parted ways later in 1991. OS/2 2.0 and later includes WinOS/2, which makes use of 386 specific features; however, WLO 1.0 still works at least up to OS/2 Warp 4.5<ref>https://web.archive.org/web/20011208005210/http://pages.prodigy.net/michaln/history/os213/index.html</ref><ref>https://www.betaarchive.com/forum/viewtopic.php?t=14196</ref>.
No later version is known to exist, and most likely it doesn't, since IBM and Microsoft parted ways later in 1991. OS/2 2.0 and later includes WinOS/2, which makes use of 386 specific features; however, WLO 1.0 still works at least up to OS/2 Warp 4.5<ref>https://web.archive.org/web/20011208005210/http://pages.prodigy.net/michaln/history/os213/index.html</ref><ref>https://www.betaarchive.com/forum/viewtopic.php?t=14196</ref>.
== Development ==
TODO: Write up how to build WLO applications under OS/2 or Windows/DOS.


== Implementation ==
== Implementation ==

Revision as of 09:08, 10 December 2022

Microsoft Windows Libraries for OS/2 (shortened to WLO) is an implementation of the Win16 API for OS/2 1.21 and higher, along with an SDK for converting existing Win16 applications to run on OS/2.

History

The first version was 0.9, announced on February 4, 1991 as Microsoft Windows Libraries for OS/2 Development Kit[1][note 1]. To make matters confusing, as is common with Microsoft, another "advanced" version named 0.9 was distrubuted on Compuserve earlier on January 1, 1991. This version is, according to Microsoft and unlike 0.9 DK, not compatible with later versions.

Version 1.0 was released some time after that, along with a Demonstration Applications distribution (WLO10.ZIP), containing WLO DLLs and the so-called Windows 3.0 accessory applets, which are ports of Calc, Calendar, Cardfile, Clipboard, Clock, Notepad, Paintbrush, Reversi, Solitaire, Windows Help, and Write from Windows 3.0. This is the only known preserved distribution of WLO, hence most of the information in this article is derived from it, if not specified otherwise.

No later version is known to exist, and most likely it doesn't, since IBM and Microsoft parted ways later in 1991. OS/2 2.0 and later includes WinOS/2, which makes use of 386 specific features; however, WLO 1.0 still works at least up to OS/2 Warp 4.5[2][3].

Development

TODO: Write up how to build WLO applications under OS/2 or Windows/DOS.

Implementation

Unlike the later WinOS/2, no virtualization is used to implement WLO. Instead, it makes use of the fact OS/2 and Windows executables have the same format, which is New Executable (NE, sometimes also called segmented executable). This is a rather complicated format, the precise description of which is out of the scope of this article. What is important here is that it contains a module reference and imported names table, which specify which modules are used by the program[4].

These are usually at the beginning of the file, hence they can be analyzed using simple string extraction:

$ strings ie5win31.exe | head
This is a Windows self-extracting ZIP file.  You can run it from
Windows or unzip it with a utility like WinZip or PKUNZIP.$
WZ-SE-01
KERNEL
KEYBOARD
USER

Here, the module names are KERNEL, KEYBOARD, and USER. These correspond to other New Executable files and contain functions that can be imported into and used to by the original program (more precisely, for this case these contain the functions exported by Windows itself). Windows can have various extensions here, for example on Windows 3.0, the corresponding files are KERNEL.EXE, USER.EXE, and KEYBOARD.DRV (all in C:\WINDOWS\SYSTEM), however, these are, in fact, of course all NE executables.

WLO ships its own version of these Windows modules, which are named KERNEL.DLL, USER.DLL, and KEYBOARD.DLL, and reside in C:\OS2\DLL (which is one of the default library paths, hence they will be found when launching an Windows executable). These are essentially a Windows implementation on top of OS/2 instead of DOS, making use of Presentation Manager for GUI.

When a Windows executable is launched on a OS/2 system with WLO installed, it is treated the same as an OS/2 executable linking to the aforementioned modules; if you are lucky (see the compatibility section below), it will work as expected. On WLO 0.9, relinking was necessary, but with WLO 1.0, this is no longer required[5].

Compatibility

TODO: Which binaries run under WLO, which don't, why.

Static version of WLO

TODO: Microsoft Word and Excel for OS/2

Notes

  1. Wikipedia says April 2, 1987, but this is likely an error, since that pre-dates the release of OS/2 1.0 by a few months.

References