Win32s is a 32-bit application runtime environment for the Microsoft Windows 3.1 and 3.11 operating systems. It allowed some 32-bit applications to run on the 16-bit operating system using call thunks.
Contents |
Win32s was intended as a partial implementation of the Win32 Windows API as it existed in early versions of Windows NT.[1]
The "s" in Win32s signifies subset, as Win32s lacked a number of Windows NT functions, including threading, asynchronous I/O, newer serial port functions and many GDI extensions. This generally limited it to "Win32s applications" which were specifically designed for the Win32s platform,[2] although some standard Win32 programs would work correctly, including Microsoft's 3D Pinball Space Cadet, Windows 95's included applets, and Office 95. Early versions of Internet Explorer (up to Version 5) were also Win32s compatible, although these also existed in 16-bit format.[3]Generally, for a 32-bit application to be compatible with Win32s, it had to not use more than 16MB of memory or any extended features such as DirectX.
Win32s inherits many of the limitations of the Win16 environment. True Win32 applications execute within a private virtual address space, whereas Windows 3.x used an address space shared among all running applications. An application running on Win32s has the shared address space and cooperative multitasking characteristics of Windows 3.1. Consequently, for a Win32 application to run on Win32s, it must contain relocation information.
A technique named thunking is fundamental to the implementation of Win32s as well as Chicago-kernel operating systems, which are Windows 95, Windows 98, and Windows Me. However, allowing user-level thunking greatly complicates attempts to provide stable memory management or memory protection on a system-wide basis, as well as core or kernel security—this allows poorly written applications to undermine system stability on Win32s, as well as the Chicago-kernel systems. The stability and security Windows NT can offer is partially based on thunking being totally illegal, except thunks from Win16 to Win32—the CPU must remain in protected mode at all times. Newer versions of Windows transparently provide a virtual machine for running Win16 applications.
Win32s-compatible applications could be built using Microsoft's development tools, as well as at least Borland C++ 4.x. However, several program compilation options and DLLs which were implicit in Windows NT 3.1 have to be included with the application in Win32s. Microsoft ceased support for Win32s in Visual C++ version 4.2 released in late 1996.
Win32s included an implementation of the card game FreeCell as an example application, a couple of years before the game became famous with its inclusion in Windows 95.
Warcraft II: Tides of Darkness, a DOS game, included a level editor that required Win32s to run. The editor used a Windows GUI for displaying the large maps because high-resolution graphic modes were already handled by Windows.
The NCSA Mosaic web browser version 2 required Win32s also.[4]
Win32s can still be found using web search engines; PW1118.EXE is generally the installation file used. Developers should ensure they are installing OLE if they require consistent clipboard handling. Many applications which need to be made OLE aware (i.e. setting up their OLE server) must be reinstalled. Win32s was also included with some early Win32 programs.
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to a number of different platform implementations that are often referred to by their own names (for example, Win32 API); see the versions section. Almost all Windows programs interact with the Windows API; on the Windows NT line of operating systems, a small number (such as programs started early in the Windows startup process) use the Native API.
Developer support is available in the form of the Windows Software Development Kit (SDK), providing documentation and tools necessary to build software based upon the Windows API and associated Windows interfaces.
The Windows API (Win32) is primarily focused on the C programming language in that its exposed functions and data structures are described in that language in recent versions of its documentation. However, the API may be used by any programming language compiler or assembler capable of handling the (well defined) low level data structures along with the prescribed calling conventions for calls and callbacks. Similarly, the internal implementation of the API's functionality has been developed in several languages, historically. Despite the fact that C lacks any notion of object-oriented programming, the Windows API as well as Windows itself has sometimes been described as object-oriented. There have also been many wrapper classes and extensions (from Microsoft or other sources) for object oriented languages that makes this object oriented structure more explicit (MFC, VCL, GDI+, etc.). For instance, Windows 8, while still providing the Windows API, also provides the WinRT API which is implemented in C++ and is object-oriented by its design.
[Instrumental]