Windows API

Windows API


What is the Windows API?

The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name "Windows API" more accurately reflects its roots in 16-bit Windows and its support in 64-bit Windows. Almost all Windows programs interact with the Windows API; on the Windows NT line of OSes, a small number (such as programs started early in the Windows startup process) use the Native API.
The Windows API is used by every software developer who wants to build applications that target the Windows operating system. In the past, where Windows development was mainly message driven, the developer had to manually write the code that created the window, set up the message processing loop, and react to every user action by receiving messages from the operating system. For example, WM_LBUTTONDOWN tells us that the user has clicked the left mouse button, while WM_PAINT tells the window procedure that the window's client area has changed and must be repainted. The modern integrated development environments (IDEs) hide the complexity of such a programming approach by allowing developers to graphically create the user interface of their applications, following the Rapid Application Development (RAD) paradigm.
Writing every single line of code is not practical and leads to a waste of time, so many software companies developed packages that wrap the big set of Windows APIs in more compact and usable class libraries  that simplify the developers' work. For example, Borland introduced the Object Windows Library (OWL), while Microsoft developed the Microsoft Foundation Class (MFC). Today there is the Microsoft .NET Framework.
The large set of libraries and functions that constitute the API are provided to software developers by the Software Development Kit (SDK, also known as Platform SDK), along with a complete set of tools (like compilers and linkers).

Return to top

The Native API

The Native API (with capitalized N) is the mostly undocumented application programming interface used internally by the Windows NT family of Windows operating systems. It is predominately used during system boot, when other components of Windows are unavailable. The program entry point is called DriverEntry(), the same as for a Windows Device Driver. However, the application runs in Ring 3 the same as a regular Windows Application. Most of the Native API calls are implemented in ntoskrnl.exe and are exposed to user mode by ntdll.dll. Some Native API calls are implemented in user mode directly within ntdll.dll.
While most of Microsoft Windows is implemented using the documented and well-defined Windows API, a few components, such as the Client/Server Runtime Subsystem, are implemented using the Native API, as they can be started earlier in the Windows NT Startup Process when the Windows API is not yet available.

Return to top

Community Resources

Web Pages

Microsoft Knowledge Base Articles

Technical Articles

See Also

NOTE: the following links are external to the TechNet Wiki.



This article was written by Luigi Bruno.

Other Languages

This article is also available in the following languages:

Italian (it-IT)

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
  • Luigi Bruno edited Revision 11. Comment: Edited article's title and "What is the Windows API?" section.

  • Luigi Bruno edited Revision 10. Comment: Edited the "web pages" section.

  • Luigi Bruno edited Revision 9. Comment: Edited the "Windows Application Programming Interface" section.

  • Ed Price - MSFT edited Revision 8. Comment: Added Credits. Removed stub aspects.

  • Luigi Bruno edited Revision 6. Comment: Edited article's tags list.

  • Luigi Bruno edited Revision 5. Comment: Added the "Books" section.

  • Luigi Bruno edited Revision 4. Comment: Added the "Technical Articles" section.

  • Luigi Bruno edited Revision 3. Comment: Edited the "Introduction" section.

  • Luigi Bruno edited Revision 2. Comment: Added the "Microsoft Knowledge Base articles" section.

  • Luigi Bruno edited Revision 1. Comment: Edited article's title and tags list. Added "Introduction" section and "Community Resources" section.

Page 2 of 2 (20 items) 12
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
  • Just adding tags. I started the "Multi Language Wiki Articles" tag so that we can track what's been hand-translated into multiple languages. Thanks!

  • That's a useful tag, Ed.

    What about the "EAA" and "ESAS" tags? What do they stand for?

  • Luigi Bruno edited Revision 18. Comment: Edited the "What is the Windows API?" section. Added a link in the "Web Pages" section.

  • Luigi Bruno edited Revision 20. Comment: Added the "See Also" section.

  • Richard Mueller edited Revision 21. Comment: made type and style changes. I hope you don't mind. I'm trying to make it easier to read.

  • Luigi Bruno edited Revision 22. Comment: Moved the "Books" list to the "See Also" section.

  • I would also like to know what meant about "EAA" and "ESAS".

  • Luigi Bruno edited Revision 23. Comment: Added the "Native API" section.

  • Luigi Bruno edited Revision 24. Comment: Fixed a link in the "Community Resources" section. Added a link in the "See Also" section.

  • Luigi Bruno edited Revision 25. Comment: Edited the "The Native API" section.

  • I believe there is..

  • Richard Mueller edited Revision 26. Comment: Removed (en-US) from title, added tags

Page 2 of 2 (27 items) 12