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
(section)
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!
==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.
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)