Windows API – The Programming Interfaces

Windows API – The Programming Interfaces

Windows API

Windows API includes all the programming interfaces (application programming interface or API) available in Windows operating systems from Microsoft. To use the Windows APIs, Microsoft provides a free Platform SDK, a collection of tools, and documentation to match a C language compiler

Versions of the Windows API

The Windows API can be divided into the following groups:

  • Win16 version of the original 16-bit Windows API, whose specifications are available as Standard ECMA-234 ECMA-coded.
  • Win32, 32-bit development for modern versions of Windows.
  • Win32s, a subset of Win32 to install versions of Windows 16-bit applications to run 32-bit compiler.
  • Win64, evolving 64-bit versions of Windows for new 64-bit processors from Intel and AMD.

Structure of the Windows API

APIs are a set of functions implemented in C language dynamic link libraries (Dynamic-link libraries or DLLs).

The Windows API, despite being written for performance reasons, a mix of assembler and C language, have a complex object-oriented model with a very uniform and a style that was an inspiration for many other projects.

The basic structure of the Windows API is largely unchanged from Windows 1.0 to date. There are three main groups of APIs: Kernel, GDI and user.

Kernel API

The kernel API provides applications with a high level interface to the services of the operating system kernel (memory management, processes, timing, etc.). On versions of Windows from Windows 1.0 to 4.9 (Windows ME), many of these APIs are simply references to the services provided by MS-DOS software interrupt. On systems with NT kernel, making the API calls to low-level API for NT Native API calls.


API GDI (Graphics Device Interface) are the graphics library for Windows systems. GDI virtualizes all graphics devices (monitors, printers, plotters) to have a homogeneous interface (called a Device Context) between the different types of devices. GDI also allows you to create and manipulate a set of graphical objects, including fonts, pens, brushes, bitmaps, etc..

User API

The API user (from user interface) providing the service interface, based on the concepts of “window” and “message”.

Non-Microsoft implementations

Although the implementation of the Windows API is subject to copyright, there are proprietary implementations of other manufacturers and also several open source projects, among which we mention WINE to emulate the Windows API on Unix-type systems, and ReactOS aims to clone the ‘entire operating system.

Libraries at higher levels

The layering of new features over time, the need for a complete backward compatibility and the huge amount of overall features (currently several thousand) has made Windows programming with the API difficult and inappropriate to the standards accepted today. For this time were born in many libraries (in languages like C + + and others) who propose an object model more abstract and simple to use, transforming the Windows API interface low.

Examples of libraries that encapsulate the Windows API are:

  • Microsoft Foundation Classes (MFC), C + + library widely used but has a reduced level of abstraction.
  • Object Windows Library (OWL), library of Borland C + + with a higher level of abstraction.
  • Active Template Library (ATL) library in C + + template-based Microsoft.
  • Windows Foundation Classes (WFC) library for Java no longer used following the lawsuit brought by Sun Microsystems to Microsoft.
  • . NET framework, Microsoft’s library of language-independent because the compilers for the CLR.

The future of the Windows API

The history of the Windows API is at a crossroads: the intent of Microsoft should give way to the library .NET especially with the new Windows Presentation Foundation component, available in version 3.0. NET Framework.