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:

    The history of modern art is also the history of the progressive loss of art’s audience. Art has increasingly become the concern of the artist and the bafflement of the public.
    Henry Geldzahler (1935–1994)

    It gives me the greatest pleasure to say, as I do from the bottom of my heart, that never in the history of the country, in any crisis and under any conditions, have our Jewish fellow citizens failed to live up to the highest standards of citizenship and patriotism.
    William Howard Taft (1857–1930)

    Social history might be defined negatively as the history of a people with the politics left out.
    —G.M. (George Macaulay)