What is WINAPI

Source: Internet
Author: User
Tags error handling file system old windows

The Windows operating system application interface, which has an informal abbreviation for WINAPI, is Microsoft's name for the kernel application programming interface available in Windows operating systems. It is designed to be called by a C + + program, and it is the most direct way for applications to interact with Windows systems. And most drivers require a more low-level access interface to Windows systems, which is provided by the version of Windows native API.

Windows has a software development kit (SDK, Software Development Kit) that provides the appropriate documentation and tools to enable programmers to develop software that uses Windows APIs and to take advantage of Windows technology.

History

The Windows API always provides programmers with a large number of low-level constructs for different windows, which helps provide a lot of flexibility and functionality for Windows programmers to develop applications. However, it also makes Windows applications responsible for handling a large number of low-level and sometimes cumbersome operations related to graphical user interface (GUI).

Charles Petzold, the author of many best-selling books on Windows API, once said: [1]

The original Hello-world program in the Windows 1.0 SDK is a bit of a scandal. HELLO. C was about lines long, and the HELLO. RC resource script had another or so more lines. (...) Veteran C programmers often curled up with horror or laughter when encountering the Windows Hello-world program.
-charles Petzold, programming Microsoft Windows with C #

The usual example program, Hello World program, is often used to demonstrate the simplest program on a system (that is, print a line of "Hello World").

Over the years, the Windows operating system has changed, and the Windows API is changing and growing and reflecting this change. Windows 1.0 version of the Windows API provides only less than 450 function calls (subroutine), and the current version provides thousands. On the whole, however, the Windows interface remains fairly well aligned, and the old Windows 1.0 programs are no stranger to programmers accustomed to the current version of Windows APIs. [2]

Microsoft has placed particular emphasis on maintaining software backward compatibility. In order to achieve this goal, sometimes Microsoft is even willing to support the use of unofficial even (programming) illegal API software. Raymond Chen, a Windows developer dedicated to Windows API, has mentioned him: [3]

Could probably write for months solely about bad things apps doing and what we had to doing 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 Upgrad Es. If any application failed to run on Windows, I took it as a personal failure.
-raymond Chen, What about Bozoslivehere and tabthetextoutforwimps?
Windows API Classification

The features provided by the Windows API can be grouped into seven categories: [4]

Basic service (base services) [5], which provides an interface to the underlying resources available to Windows systems. For example: File System (filesystem), external devices (device), processes (process), threads (thread), and access to the registry (Windows Registry) and error handling mechanisms (fault handling). These feature interfaces are located in the Kernel.exe, Krnl286.exe, or krnl386.exe system files under 16-bit Windows, and in Kernel32.dll and Advapi32.dll under 32-bit Windows.

Graphics Device Interface (GDI) [6], which provides the ability to output graphical content to monitors, printers, and other external output devices. It is located under 16-bit Windows Gdi.exe, and Gdi32.dll under 32-bit Windows.

The graphical user interface (GUI) [7] provides the ability to create and manage screens and most basic controls, such as buttons and scroll bars. Receive mouse and keyboard input, as well as other GUI-related features. These call interfaces are located in: User.exe under 16-bit Windows, and user32.dll under 32-bit Windows. After the Windows XP version, the call interface for the base control and the common Dialog control Library is placed in the Comctl32.dll.

The common dialog Box link library (Common Dialog box Library) [8] provides standard dialog boxes for applications, such as opening/saving file dialogs, color to frame and Font dialog boxes, and more. This link library is located in the Commdlg.dll under 16-bit Windows and in the 32-bit Windows Comdlg32.dll. It is categorized under the user Interface API.

The generic Control link library (Common controls Library) [9] provides an interface for applications to access some of the advanced controls provided by the operating system. Like this: status bar, progress bar (progress bars), Toolbars (toolbar), and Tabs (tab). This link library is located in Commctrl.dll under 16-bit Windows, and in 32-bit Windows Comctl32.dll. It is categorized under the user Interface API.

Windows shell (Windows shell) [10][11], as part of the Windows API, not only allows applications to access the functionality provided by the operating system Shell, but also improves and enhances it. It is located in Shell.dll under 16-bit Windows, and in Shell32.dll under 32-bit Windows (Windows 95 is in Shlwapi.dll). It is categorized under the user Interface API.

Network Service (network services) [12] provides an interface for accessing a variety of network features provided by the operating system. It includes NetBIOS, Winsock, NetDDE, RPC and so on.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.