An Overview of Win32s What is Win32s? Win32s is Microsoft's first step towards providing a Win32 environment on MS-DOS-based operating systems. With Win32s, programs written for tomorrow's 32-bit operating systems will run on today's widely installed Windows version 3.1. Win32s is an extension of Windows version 3.1 that allows applications using a subset of the Win32 Application Programming Interface (API) to run unmodified on both Windows version 3.1 and Windows NT. The Win32s subset consists of Win32 equivalents of Win16 functions (Win16 is the 16-bit API offered in Windows version 3.1) as well as flat memory management and structured exception- handling features. Win32s programs will take full advantage of the 32-bit capabilities of the Intel 80x86 microprocessors. Using the Win32s API, developers can compile and run 32-bit code today that will be supported across Microsoft's 32-bit platforms tomorrow. Win32s consists of three components: an executable that loads Win32s applications in Windows version 3.1, a virtual device driver that provides flat memory model and structured exception-handling support, and a set of Dynamic Link Libraries (DLLs) that translate Win32 function calls to Win16 function calls. To run your Win32s application on Windows version 3.1, you must include these Win32s components with your application. You will be able to ship your application with Win32s royalty-free, the same way that you can ship COMMDLG.DLL and TOOLHELP.DLL today. Why should you convert your application to Win32s? To take advantage of 32-bit development 32-bit development means that applications no longer have to deal with the segmented memory addressing of 16-bit systems. This will facilitate memory allocation in most applications because 64K memory boundaries no longer apply. 32-bit applications are faster and more efficient because they take advantage of the 32-bit specific instructions and register sets available in 80386 and 80486 computers. Moreover, Intel is optimizing the 80486 and future processors for 32-bit operation instead of 16-bit operation. Although other 32-bit development systems for Windows exist, Win32s is the only system that will run applications seamlessly under Windows version 3.1, on Windows NT, and on future versions of Windows for MS-DOS environments. To improve performance Win32s is a perfect candidate for applications that are memory- intensive or calculation-intensive, such as CAD packages, paint packages, image manipulation tools, spreadsheet programs, and simulation software. Manipulating data in 32-bit mode improves the performance of these applications significantly. Win32s applications will also see performance improvements in Windows version 3.1, despite the slight overhead caused by 32-bit to 16-bit translation (thunking) that occurs during API calls. On Windows NT, Win32s applications will call Win32 functions directly; for this reason, a Win32s application will run faster than its Win16 counterpart on both Windows version 3.1 and on Windows NT. To make your application binary-compatible with Windows The executable format of Win32s applications is identical to that of Windows NT applications. Although Windows NT supports existing Win16-based applications, a Win32s application running on Window NT will gain additional functionality (such as desynchronized messaging and process protection), which will not be available to a Win16-based application. In general, developers can write Win32s applications that sample the environment and take advantage of any additional functions the environment supports. For example, an application that is single-threaded in Windows version 3.1 can support multiple threads in Windows NT. A Win32s application requires only recompiling and linking (with no code changes) to run native on other hardware platforms that support Windows NT, such as MIPS R4000 and DEC Alpha. To migrate easily from other 32-bit platforms to Windows Applications developed for UNIX or other 32-bit environments are often difficult to port to 16-bit systems because of memory constraints. Win32s removes the 64K memory barrier so these 32-bit applications are easier to port. Is Win32s for your application? Thunking overhead The Win32s extension to Windows version 3.1 contains two types of functions: thunked functions (which are converted to 16-bit functions) and non-thunked functions (which are called directly in 32-bit mode). The Win32 equivalents of Win16 functions are thunked, whereas memory management functions are not. There is an estimated two to eight percent overhead for thunking. For this reason, Win32s is best suited for applications that are memory-intensive or calculation-intensive. Because of the thunking overhead, user- interface intensive applications with few memory traversals or calculations may not see performance gains. There is no overhead when a Win32s application runs on Windows NT because the application calls Windows NT's 32-bit functions directly. Windows version 3.1 requirements To run your Win32s application in Windows version 3.1, the user must have Windows version 3.1 running in protected mode (not standard mode), a 80386 microprocessor (minimum), and the Win32s components shipped with your application. Win32s applications are not backward-compatible with Windows version 3.0. How should you test your Win32s application? Users will expect your Win32s application to run on both Windows version 3.1 and Windows NT. For this reason, you must test your application thoroughly on both platforms and verify compatibility. When will Win32s be available? Win32s will be delivered to you as part of the Win32 Software Development Kit (SDK) for Windows NT. Win32s will not be included in the Preliminary Win32 SDK for Windows NT but will be available in an SDK update in late 1992. Microsoft will distribute the Preliminary Win32 SDK for Windows NT to attendees at the Win32 Professional Developers Conference (San Francisco, July 6-8, 1992). Starting July 20, developers can order the SDK or request more information directly from the Microsoft Developer Services Team at (800) 227-4679, extension 11771. When can I start building my Win32s application? You can use the Preliminary Win32 SDK for Windows NT now You need not wait for Win32s availability to start developing your Win32s application. You can use the Preliminary Win32 SDK to port your Win16 application to Win32 and begin your development work immediately. The first step is to perform a simple port using only Win32 features that Win32s supports. (The Preliminary SDK includes a list of supported functions.) When Win32s becomes available in an update to the SDK, simply test your application and ship it with the Win32s software so it will run on Windows version 3.1. Or, wait for Win32s support on MS-DOS Win32s development tools for Windows 3.1 will be available in late 1992. If you would like to continue your current development work using Windows for MS-DOS tools, you may decide to wait for this release. How does Win32s fit into Microsoft's system strategy? Win32s is an integral part of Microsoft's system strategy and represents the first step in the evolutionary process towards 32- bit processing in Windows. Although Windows for MS-DOS will continue to run 16-bit applications, Microsoft plans to convert the Windows operating system code to 32 bits. Thus, 32-bit applications will run faster and use memory more efficiently in Windows. Win32s applications are the only applications that can run native on both Windows NT and on Windows version 3.1 without performance degradation. The PC hardware and software industries are already optimizing their systems for 32-bit operation. Microsoft encourages you to take advantage of these developments today by designing your applications with Win32s.