Windows API - History

History

The Windows API has always exposed a large part of the underlying structure of the Windows systems to the programmer. This has had the advantage of giving Windows programmers a great deal of flexibility and power over their applications. However, it also has given Windows applications a great deal of responsibility in handling various low-level, sometimes tedious, operations that are associated with a graphical user interface.

Charles Petzold, writer of several books about programming against the Windows API, has said: "The original hello world program in the Windows 1.0 SDK was a bit of a scandal. HELLO.C was about 150 lines long, and the HELLO.RC resource script had another 20 or so more lines. (...) Veteran C programmers often curled up in horror or laughter when encountering the Windows hello-world program."

Over the years, various changes and additions were made to the Windows Operating System, and the Windows API changed and grew to reflect this. The Windows API for Windows 1.0 supported fewer than 450 function calls, where in modern versions of the Windows API there are thousands. However, in general, the interface remained fairly consistent, and an old Windows 1.0 application will still look familiar to a programmer who is used to the modern Windows API.

An emphasis has been made by Microsoft on maintaining software backwards compatibility. To achieve this, when developing a new version of Windows, Microsoft sometimes had to implement workarounds to allow compatibility with third-party software that used the previous version's API in an undocumented or even (programmatically) illegal way. Raymond Chen, a Microsoft developer who works on the Windows API, has said: "I could probably write for months solely about bad things apps do and what we had to do to get them to work again (often in spite of themselves). Which is why I get particularly furious when people accuse Microsoft of maliciously breaking applications during OS upgrades. If any application failed to run on Windows 95, I took it as a personal failure."

One of the largest changes the Windows API underwent was the transition from Win16 (shipped in Windows 3.1 and older) to Win32 (Windows NT and Windows 95 and up). While Win32 was originally introduced with Windows NT 3.1 and Win32s allowed usage of a Win32 subset before Windows 95, it was not until Windows 95 that widespread porting of applications to Win32 began. To ease the transition, in Windows 95, both for external developers and for Microsoft itself, a complex scheme of API thunks was used that could allow 32 bit code to call into 16 bit code and (for the majority of Win16 APIs) vice-versa. Flat thunks allowed 32 bit code to call into 16 bit libraries, and the scheme was used extensively inside Windows 95's libraries to avoid porting the whole OS to Win32 itself in one chunk. In Windows NT, the OS was pure 32-bit (except the parts for compatibility with 16-bit applications), and only generic thunks were available to thunk from Win16 to Win32, as for Windows 95. The Platform SDK shipped with a compiler that could produce the code necessary for these thunks.

Read more about this topic:  Windows API

Famous quotes containing the word history:

    Indeed, the Englishman’s history of New England commences only when it ceases to be New France.
    Henry David Thoreau (1817–1862)

    The history of medicine is the history of the unusual.
    Robert M. Fresco, and Jack Arnold. Prof. Gerald Deemer (Leo G. Carroll)

    It is remarkable how closely the history of the apple tree is connected with that of man.
    Henry David Thoreau (1817–1862)