Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Windows API
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Microsoft's core set of application programming interfaces on Windows}} {{Use mdy dates|date=November 2023}} {{Use American English|date=November 2023}} {{Infobox software | logo = | screenshot = Windows_2000_architecture.svg | screenshot size = | caption = The [[Win32]] subsystem shown next to the [[Microsoft POSIX subsystem|POSIX]] and [[OS/2 subsystem]] in the [[architecture of Windows NT]] (later [[Win64]] is also available.) | author = | developer = [[Microsoft]] | released = {{Start date and years ago|1985|11|20}} | latest release version = | latest release date = | latest preview version = | latest preview date = | replaces = [[DOS API]] | operating system = [[Microsoft Windows]], [[OS/2]] | platform = | genre = [[API]] | license = [[Proprietary software|Proprietary]] | website = {{URL|https://learn.microsoft.com/windows/apps/}} }} The '''Windows API''', informally '''WinAPI''', is the foundational [[API|application programming interface (API)]] that allows a [[computer program]] to access the features of the [[Microsoft Windows]] [[operating system]] in which the program is running. Programs can access API functionality via [[Shared library|shared-library]] technologies or via [[Microsoft Windows library files|system-file]] access.{{Disputed inline|How are "Microsoft Windows library files" not shared libraries?|date=February 2025}} Each major version of the Windows API has a distinct name that identifies a compatibility aspect of that version. For example, Win32 is the major version of Windows API that runs on 32-bit systems. The name, Windows API, collectively refers to all versions of this capability of Windows. Microsoft provides developer support via a [[software development kit]], [[Microsoft Windows SDK]], which includes documentation and tools for building software based on the Windows API. ==Services== {{Update section|reason=The categories are out of date, as are the references for it; see, for example, https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-api-list.|date=May 2023}} This section lists notable services provided by the Windows API.<ref>{{cite web |url=https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-api-list |title=Windows API Index|date=March 15, 2023 }}</ref> ===Base Services=== Base services include features such as the [[file system]], [[Computer hardware|devices]], [[Process (computing)|processes]], [[Thread (computer science)|threads]], and [[error handling]]. These functions reside in <samp>kernel.exe</samp>, <samp>krnl286.exe</samp> or <samp>krnl386.exe</samp> files on 16-bit Windows, and <samp>[[kernel32.dll]] and KernelBase.dll</samp> on 32 and 64 bit Windows. These files reside in the folder <samp>\Windows\System32</samp> on all versions of Windows.<ref name="msdn-base">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/base_services.asp Base Services.]'' Retrieved August 28, 2005.</ref> ===Advanced Services=== Advanced services include features beyond the kernel like the [[Windows registry]], shutdown/restart the system (or abort), start/stop/create a [[Windows service]], manage user accounts. These functions reside in <samp>advapi32.dll</samp> and <samp>advapires32.dll</samp> on 32-bit Windows. ===Graphics Device Interface=== The [[Graphics Device Interface]] (GDI) component provides features to output graphics content to [[computer display|monitors]], [[Computer printer|printers]], and other [[output device]]s. It resides in <samp>gdi.exe</samp> on 16-bit Windows, and <samp>[[gdi32.dll]]</samp> on 32-bit Windows in user-mode. Kernel-mode GDI support is provided by <code>win32k.sys</code> which communicates directly with the graphics driver.<ref name="msdn-gdi">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/graphics_device_interface.asp Graphics Device Interface.]'' Retrieved August 28, 2005.</ref><ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/ms789535.aspx|title=G|publisher=[[Microsoft Developer Network]]|access-date=2009-01-28}}</ref> ===User Interface=== The [[Windows User|User Interface]] component provides features to create and manage screen [[window (computing)|windows]] and most basic controls, such as [[button (computing)|buttons]] and [[scrollbar]]s, receive mouse and keyboard input, and other functions associated with the [[graphical user interface]] (GUI) part of Windows. This functional unit resides in <samp>user.exe</samp> on 16-bit Windows, and <samp>[[user32.dll]]</samp> on 32-bit Windows. Since [[Windows XP]] versions, the basic controls reside in <samp>comctl32.dll</samp>, together with the common controls (Common Control Library).<ref name="msdn-ui">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/user_interface.asp User Interface.]'' Retrieved August 28, 2005.</ref> ===Common Dialog Box Library=== The Common Dialog Box Library provides standard [[dialog box]]es to open and save files, choose color and font, etc. The library resides in a file called <samp>commdlg.dll</samp> on 16-bit Windows, and <samp>comdlg32.dll</samp> on 32-bit Windows. It is grouped under the ''User Interface'' category of the API.<ref name="msdn-comdlg">[[Microsoft Developer Network]] (2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary.asp Common Dialog Box Library.]'' Retrieved September 22, 2005.</ref> ===Common Control Library=== The Common Control Library provides access to advanced user interface controls, including things like [[status bar]]s, [[progress bar]]s, [[toolbar]]s and [[tab (GUI)|tabs]]. The library resides in a DLL file called <samp>commctrl.dll</samp> on 16-bit Windows, and <samp>comctl32.dll</samp> on 32-bit Windows. It is grouped under the ''User Interface'' category of the API.<ref name="msdn-ccl">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/common_control_library.asp Common Control Library.]'' Retrieved August 28, 2005.</ref> ===Windows Shell=== The Windows Shell component provides access to the [[operating system shell]]. The component resides in <samp>shell.dll</samp> on 16-bit Windows, and <samp>shell32.dll</samp> on 32-bit Windows. The Shell Lightweight Utility Functions are in <samp>shlwapi.dll</samp>. It is grouped under the ''User Interface'' category of the API.<ref name="msdn-shell">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_shell.asp Windows Shell.]'' Retrieved August 28, 2005.</ref><ref name="msdn-shell2">[[Microsoft Developer Network]] (2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_intro.asp Shell Programmer's Guide.]'' Retrieved August 28, 2005.</ref> ===Network Services=== Network Services provide access to the various [[Computer network|networking]] abilities of the operating system. Its subcomponents include [[NetBIOS]], [[Winsock]], [[NetDDE]], [[remote procedure call]] (RPC) and many more. This component resides in <samp>netapi32.dll</samp> on 32-bit Windows.<ref name="msdn-network">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/en-us/library/aa969177 Network Services.]'' Retrieved August 28, 2005.</ref> ===Web=== The [[Internet Explorer]] (IE) web browser exposes APIs and as such could be considered part of the Windows API. IE has been included with the operating system since [[Windows 95 OSR2]] and has provided web-related services to applications since [[Windows 98]].<ref name="msdn-browser">[[Microsoft Developer Network]] (January 2006); ''[http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp Programming and reusing the browser]'' Retrieved January 22, 2006.</ref> ==Program interaction== The Windows API is a [[C (programming language)|C language]]-based API.<ref>{{cite web|url=https://docs.microsoft.com/en-us/cpp/windows/walkthrough-creating-windows-desktop-applications-cpp|title=Walkthrough: Create a traditional Windows Desktop application (C++)|date=February 23, 2022|website=[[Microsoft Docs]]}}</ref> Functions and data structures are consumable via C syntax by including [[windows.h]], but the API can be consumed via any programming language that can inter-operate with the API data structures and [[calling convention]]s for [[function call]]s and [[callback (computer programming)|callbacks]]. Of note, the implementation of API functions has been developed in several languages other than C.{{efn|Both [[Pascal (programming language)|Pascal]] and [[x86 assembly]] were heavily used in earlier versions, before C became dominant. A reminiscence of this is that the API functions still use the [[Pascal calling convention]] to restore the stack from pushed parameters after a call (although they expect parameters pushed from right to left, as most C compilers do, by default).}} Despite the fact that C is not an [[object-oriented programming]] (OOP) language, the Windows API is somewhat object-oriented due to its use of handles. Various other technologies from Microsoft and others make this object-oriented aspect more apparent by using an OOP language such as C++ β see [[Microsoft Foundation Class Library]] (MFC), [[Visual Component Library]] (VCL), [[GDI+]]. Of note, [[Windows 8]] provides the Windows API and the [[WinRT]] API, which is implemented in [[C++]]<ref name="rtcpp">{{cite book |title=WinRT Revealed |publisher=Apress |author=Mayberry, Michael |year=2012 |location=New York City |pages=3 |isbn=978-1-4302-4585-8}}</ref> and is object-oriented by design.<ref name="rtcpp"/> Windows.pas is a [[Delphi (programming language)|Delphi]] unit that exposes the features of Windows API {{endash}} the [[Pascal (programming language)|Pascal]] equivalent of [[windows.h]].<ref>{{cite book |url=https://books.google.com/books?id=9JzBn4vcUBoC&q=%22windows.pas%22&pg=PA253 |title=Borland Delphi 6 Developer's Guide |publisher=Sams |author=Texeira, Steve and Xavier Pacheco |year=2002 |pages=253 |isbn=0672321157}}</ref> ==Related technologies== Many Microsoft technologies use the Windows API -- as most software running on Windows does. As middle-ware between Windows API and an application, the following technologies provide some access to Windows API. Some technologies are described as [[Wrapper library|wrapping]] Windows API, but this is debatable since they don't provide or expose all of the capabilities of Windows API. * [[Microsoft Foundation Class Library]] (MFC) exposes some of Windows API functionality in [[C++]] [[Class (computer science)|classes]], and thus allows a more [[Object-oriented programming|object-oriented]] way to interact with the API * [[Active Template Library]] (ATL) is a [[C++]] [[Template (programming)|template]] library that provides some Windows API access * [[Windows Template Library]] (WTL) was developed as an extension to ATL, and intended as a smaller alternative to MFC * Most [[application framework]]s for Windows provide some access to Windows API; including [[.NET Framework|.NET runtime]] and [[Java (programming language)|Java virtual machine]] and any other [[programming language]]s targeting Windows * Various technologies for communicating between components and applications {{endash}} starting with [[Dynamic Data Exchange]] (DDE), which was superseded by [[Object Linking and Embedding]] (OLE) and later by the [[Component Object Model]] (COM), [[OLE Automation|Automation Objects]], [[ActiveX]] controls, and the [[.NET Framework]] Although almost all Windows programs use the Windows API, on the Windows NT line of operating systems, programs that start early in the [[Windows NT startup process|Windows startup process]] use the [[Windows Native API|Native API]] instead.<ref name="technet-nativeapi">{{cite web|website=[[Microsoft Docs]]|date=November 2006|url=https://docs.microsoft.com/en-us/sysinternals/resources/inside-native-applications|title=Inside Native Applications|first=Mark|last=Russinovich|author-link=Mark Russinovich|access-date=April 12, 2022}}</ref> ==History== The Windows API has always exposed a large part of the underlying structure of the Windows systems to programmers. This had the advantage of giving them much flexibility and power over their applications, but also creates great responsibility in how applications handle various low-level, sometimes tedious, operations that are associated with a [[graphical user interface]]. For example, a beginning C programmer will often write the simple "hello world" as their first assignment. The working part of the program is only a single printf line within the main subroutine. The overhead for linking to the standard I/O library is also only one line: {{Wikibooks|Computer Programming|Hello world#Windows API (in C)}} <syntaxhighlight lang="c">#include <stdio.h> int main(void) { printf("Hello, World!\n"); }</syntaxhighlight> [[Charles Petzold]], who wrote several books about programming for the Windows API, 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 programmers often curled up in horror or laughter when encountering the Windows hello-world program."<ref name="petzold-47">[[Charles Petzold]] (December 2001). ''Programming Microsoft Windows with C#''. Microsoft Press. Beyond the Console, page 47.</ref> Petzold explains that while it was the first Windows sample programs developers were introduced to, it was quite "fancy" and more complex than needed. Tired of people ridiculing the length of the sample, he eventually reduced it to a simple MessageBox call.<ref>{{Cite web |last=Petzold |first=Charles |title=The Infamous Windows "Hello World" Program |url=https://www.charlespetzold.com/blog/2014/12/The-Infamous-Windows-Hello-World-Program.html |access-date=2024-06-30 |website=www.charlespetzold.com |language=en}}</ref> Over the years, various changes and additions were made to Windows systems, and the Windows API changed and grew to reflect this.<ref name="winapi-changes">''[http://abi-laboratory.pro/index.php?view=winapi Detailed analysis of changes in the Windows API from XP to 10.]'' Retrieved September 08, 2016.</ref> The Windows API for [[Windows 1.0]] supported fewer than 450 [[Subroutine|function calls]], whereas modern versions of the Windows API support 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.<ref name="petzold-9">[[Charles Petzold]] (November 11, 1998). ''Programming Windows, Fifth Edition''. Microsoft Press. APIs and Memory Models, page 9.</ref> Microsoft has made an effort to maintain [[backward compatibility]]. To achieve this, when developing new versions of Windows, Microsoft sometimes implemented workarounds<ref>{{cite web |last1=Smith |first1=Graham |title=Windows 95 had special code just to fix a bug in the original SimCity |url=https://www.rockpapershotgun.com/windows-95-had-special-code-just-to-fix-a-bug-in-the-original-simcity |website=Rock, Paper, Shotgun |language=en |date=8 October 2022}}</ref> to allow compatibility with third-party software that used the prior version in an undocumented or even inadvisable way. [[Raymond Chen (Microsoft)|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."<ref name="chen-bozos">[[Raymond Chen (Microsoft)|Raymond Chen]] (October 15, 2003). ''[https://devblogs.microsoft.com/oldnewthing/20031015-00/?p=42163 What about BOZOSLIVEHERE and TABTHETEXTOUTFORWIMPS?]'' Retrieved June 29, 2022.</ref> One of the largest changes to the Windows API 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 use 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, for developers outside and inside Microsoft, a complex scheme of API [[thunk (compatibility mapping)|thunks]] was used that could allow 32-bit code to call into 16-bit code (for most of Win16 APIs) and 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 in one batch. In Windows NT, the OS was pure 32-bit, except 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 needed for these thunks. Versions of 64-bit [[Windows]] are also able to run 32-bit applications via [[WoW64]]. The SysWOW64 folder located in the Windows folder on the OS drive contains several tools to support 32-bit applications.<ref>{{Cite web |last=Hoffman |first=Chris |title=What's the Difference Between the "System32" and "SysWOW64" Folders in Windows? |url=https://www.howtogeek.com/326509/whats-the-difference-between-the-system32-and-syswow64-folders-in-windows/ |access-date=2023-04-11 |website=How-To Geek |date=February 16, 2018 |language=en-US}}</ref> =={{anchor|Win16|Win32|Win32c|Win32s|Win64|WinCE}}Major versions== Each version of Microsoft Windows contains a version of Windows API, and almost every new version of Microsoft Windows has introduced additions and changes to the Windows API.<ref name="win32faq-history">The Iseran Project (1996β2001). ''[https://web.archive.org/web/20020802081510/http://www.iseran.com/Win32/FAQ/history.html History of the Windows API.]'' Retrieved October 7, 2005.</ref> The name, Windows API, refers to essentially the same capability in each version of Windows, but there is another name for this capability that is based on major architectural aspects of the Windows version that contains it. When there was only one version, it was simply called Windows API. Then, when the first major update was made, Microsoft gave it the name Win32 and gave the first version the name Win16. The term Windows API refers to both versions and all subsequently developed major versions.<ref name="msdn-overview2">[[Microsoft Developer Network]] (July 2005). ''[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/overview_of_the_windows_api.asp Overview of the Windows API.]'' Retrieved August 28, 2005.</ref> * '''Win16''' is in the [[16-bit computing|16-bit]] versions of Windows. The functions reside mainly in core files of the OS: ''kernel.exe'' (or ''krnl286.exe'' or ''krnl386.exe''), ''user.exe'' and ''gdi.exe''. Despite the [[file extension]] of <samp>exe</samp>, such a file is accessed as a DLL. * '''Win32''' is in the [[32-bit computing|32-bit]] versions of Windows (NT, 95, and later). The functions are implemented in system DLL files including [[kernel32.dll]], [[Windows USER|user32.dll]], and [[gdi32.dll]]. Win32 was introduced with [[Windows NT]]. In [[Windows 95]], it was initially referred to as Win32c, with ''c'' meaning ''compatibility''. This term was later abandoned by Microsoft in favor of Win32. * '''[[Win32s]]''' is an extension for the [[Windows 3.1x#Windows 3.1|Windows 3.1x]] family of Microsoft Windows that implemented a [[subset]] of the Win32 API for these systems. The "s" stands for "subset". * '''Win64''' is the version in the [[64-bit computing|64-bit]] [[Windows NT#Supported platforms|platforms]] of the [[Architecture of the Windows NT operating system line|Windows architecture]] ({{as of|2021|lc=on}}, [[x86-64]] and [[AArch64]]).{{efn|Nomenclature of released 64-bit versions includes [[Windows XP Professional x64 Edition]] and x64 Editions of Windows Server 2003, Windows Vista and Windows Server 2008 on the x86-64 (AMD64) platform, and [[Windows 2000]] Server Limited Edition, [[Windows XP 64-bit Edition]], Windows Advanced Server 2003 for [[Itanium]] and Windows 2008 Advanced Server for [[Itanium]] on the [[IA-64]] platform.}}<ref name="XPx64">{{cite web |url=http://www.microsoft.com/windowsxp/64bit/ |title=Windows XP Professional x64 Edition home page |publisher=Microsoft|archive-url=https://web.archive.org/web/20060111151707/http://www.microsoft.com/windowsxp/64bit/default.mspx|archive-date=2006-01-11|url-status=dead}}</ref><ref name="2003x64">{{cite web |url=http://www.microsoft.com/servers/64bit/ |title=Microsoft 64-bit Computing Overview |publisher=Microsoft |archive-url=https://web.archive.org/web/20090112225501/http://www.microsoft.com/servers/64bit/overview.mspx |archive-date=2009-01-12 |url-status = dead}}</ref> Both 32-bit and 64-bit versions of an application can be compiled from one [[codebase]], although some older API functions have been deprecated, and some of the API functions that were deprecated in Win32 were removed. All memory [[pointer (computer programming)|pointers]] are 64-bit by default (the [[LLP64]] model), so porting Win32-compatible source code includes updating for 64-bit [[pointer arithmetic]].<ref name="64bitMigration">{{cite web |url=http://msdn.microsoft.com/en-us/library/aa384198(VS.85).aspx |title=MSDN: Getting Ready for 64-bit Windows |date=August 19, 2020 |publisher=Microsoft}}</ref> * '''WinCE''' is the version in the [[Windows CE]] operating system. ==Other implementations== [[File:ReactOS Frankenstein Email.png|thumb|[[ReactOS]] is a [[free and open-source software|free and open-source]] operating system that aims to implement the Windows API]] The [[Wine (software)|Wine]] project provides a Win32 API [[compatibility layer]] for [[Unix-like]] platforms, between [[Linux kernel API]] and programs written for the Windows API. [[ReactOS]] goes a step further and aims to implement the full Windows operating system, working closely with the Wine project to promote code re-use and compatibility. [[DosWin32]] and [[HX DOS Extender]] are other projects which emulate the Windows API to allow executing simple Windows programs from a [[DOS]] command line. [[Odin (code conversion software)|Odin]] is a project to emulate Win32 on [[OS/2]], superseding the original Win-OS/2 emulation which was based on Microsoft code. Other minor implementations include the MEWEL and [[Zinc Application Framework|Zinc]] libraries which were intended to implement a subset of the Win16 API on DOS (see [[List of platform-independent GUI libraries]]). [[Windows Interface Source Environment]] (WISE) was a licensing program from Microsoft which allowed developers to recompile and run Windows-based applications on [[Unix]] and [[Macintosh]] platforms. WISE SDKs were based on an emulator of the Windows API that could run on those platforms.<ref>[http://hyper.sunjapan.com.cn/~hz/win32/wise.htm WISE] {{webarchive|url=https://web.archive.org/web/20080330032918/http://hyper.sunjapan.com.cn/~hz/win32/wise.htm |date=2008-03-30 }}</ref> Efforts toward standardization included Sun's [[Public Windows Interface]] (PWI) for Win16 (see also: Sun Windows Application Binary Interface ([[Wabi (software)|Wabi]])), Willows Software's [[Application Programming Interface for Windows]] (APIW) for Win16 and Win32 (see also: [[Willows TWIN]]), and [[ECMA-234]], which attempted to standardize the Windows API bindingly. ==Compiler support== To develop software that uses the Windows API, a compiler must be able to use the Microsoft-specific DLLs listed above (COM-objects are outside Win32 and assume a certain vtable layout). The compiler must either handle the header files that expose the interior API function names, or supply such files. For the language C++, Zortech (later [[NortonLifeLock|Symantec]], then [[Digital Mars]]), [[Watcom]] and [[Borland]] have all produced well-known commercial compilers that have been used often with Win16, Win32s, and Win32. Some of them supplied ''memory extenders'', allowing Win32 programs to run on Win16 with Microsoft's redistributable Win32s DLL. The Zortech compiler was probably one of the first stable and usable C++ compilers for Windows programming, before Microsoft had a C++ compiler. For certain classes of applications, the compiler system should also be able to handle [[interface description language]] (IDL) files. Collectively, these prerequisites (compilers, tools, libraries, and headers) are known as the ''[[Microsoft Platform SDK]]''. For a time, the Microsoft [[Visual Studio]] and [[Borland]]'s integrated development system were the only [[integrated development environment]]s (IDEs) that could provide this (although, the SDK is downloadable for free separately from the entire IDE suite, from [https://www.microsoft.com/en-us/download/details.aspx?id=8442 Microsoft Windows SDK for Windows 7 and .NET Framework 4]). {{As of|2016}}, the [[MinGW]] and [[Cygwin]] projects also provide such an environment based on the [[GNU Compiler Collection]] (GCC), using a stand-alone header file set, to make linking against the Win32-specific DLLs simple. [[LCC-Win32]] is a C compiler maintained by Jacob Navia, [[freeware]] for non-commercial use. [[Pelles C]] is a freeware C compiler maintained by Pelle Orinius. [[Free Pascal]] is a [[free software]] [[Object Pascal]] compiler that supports the Windows API. The MASM32 package is a mature project providing support for the Windows API under [[Microsoft Macro Assembler]] (MASM) by using custom made or converted headers and libraries from the Platform SDK. Flat assembler [[FASM]] allows building Windows programs without using an external linker, even when running on Linux. Windows specific compiler support is also needed for [[Microsoft-specific exception handling mechanisms#Structured Exception Handling|Structured Exception Handling]] (SEH). This system serves two purposes: it provides a substrate on which language-specific [[exception handling]] can be implemented, and it is how the kernel notifies applications of exceptional conditions such as dereferencing an invalid pointer or stack overflow. The Microsoft/Borland C++ compilers had the ability to use this system as soon as it was introduced in Windows 95 and NT, however the actual implementation was undocumented and had to be reverse engineered for the Wine project and free compilers. SEH is based on pushing exception handler frames onto the stack, then adding them to a linked list stored in [[thread-local storage]] (the first field of the thread environment block). When an exception is thrown, the kernel and base libraries [[stack unwinding|unwind the stack]] running handlers and filters as they are encountered. Eventually, every exception unhandled by the application will be dealt with by the default backstop handler, which pops up the Windows common crash dialog. ==See also== * {{Annotated link|Windows Libraries for OS/2}} * {{Annotated link|Interix}} * {{Annotated link|Linux kernel API}} * {{Annotated link|Microsoft Windows library files}} * {{Annotated link|Windows legacy audio components}} * {{Annotated link|C++/WinRT}} ==Notes== {{Notelist}} ==References== {{Reflist}} ==External links== {{wikibooks|Windows Programming}} *[https://learn.microsoft.com/windows/win32/apiindex/windows-api-list MSDN Windows API index] *[https://docs.microsoft.com/samples/browse/?filter-products=windows%20api&products=windows-api-win32 Windows API Microsoft Code Samples] *[https://www.ecma-international.org/publications-and-standards/standards/ecma-234/ ECMA-234] β [[Ecma International|ECMA]] standard for a subset of the Windows API *[news://comp.os.ms-windows.programmer.win32 Advanced Win32 API newsgroup] *[news://fr.comp.os.ms-windows.programmation French Win32 API newsgroup] {{Microsoft APIs}} {{Microsoft Windows components}} {{Widget toolkits}} {{GUI builders}} [[Category:Windows APIs| ]] [[Category:Microsoft application programming interfaces]] [[Category:Articles with example C code]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Annotated link
(
edit
)
Template:As of
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Disputed inline
(
edit
)
Template:Efn
(
edit
)
Template:Endash
(
edit
)
Template:GUI builders
(
edit
)
Template:Infobox software
(
edit
)
Template:Microsoft APIs
(
edit
)
Template:Microsoft Windows components
(
edit
)
Template:Notelist
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Update section
(
edit
)
Template:Use American English
(
edit
)
Template:Use mdy dates
(
edit
)
Template:Webarchive
(
edit
)
Template:Widget toolkits
(
edit
)
Template:Wikibooks
(
edit
)