20-Year Review of Microsoft software development technology (API)

Source: Internet
Author: User
Ii. API

As the Windows operating system becomes dominant, developing applications on the Windows platform Program It becomes a need of people. Of course, this also provides a new programming method for traditional dos programmers-an event-driven programming method that is not limited by devices. On the other hand, the development of Windows GUI forces traditional dos programmers to change their programming methods. At that time, most DOS software was programmed in a procedural manner, that is, when one function calls another function, the main program is always under control, and the event-driven programming mode causes the program to give up all their control, wait for external events and respond to them so that all their functions are provided to the end user. The result is that the structure of today's Win32 (including early Win16 of course) GUI program is still the same as that in 1987. Figure 1 shows the basic structure of a Windows GUI application.

 


1. Basic Structure of Windows GUI applications.

Each program contains an entry point, the creation of the main window, a message loop, and the Undo of the main window. In addition, there is a function associated with the main window process, called the window process, it contains information used to process system events and application events (such as keyboard input, mouse movement and clicking, Timer alarms, menu selection, and Button clicking ).Code.

At the early stage of Windows program design, only APIs (application programming interfaces) functions can be used by Windows programmers. These functions are interfaces provided by windows to applications and operating systems, like blocks, they can be used to build applications with rich functions and flexibility on various interfaces. Therefore, we can think that API functions are the cornerstone of building the entire windows framework. below it is the core of the Windows operating system, and above it is a Windows application with various features. At that time, due to the lack of a good windows programming platform, programmers wanted to write software with a Windows style, and they had to use APIs, so they were given the highest position. Correspondingly, programmers must memorize a lot of common API functions and have a deep understanding of the Windows operating system.

With the continuous development of software technology, many excellent Visual Programming Environments (such as VB, VC ++, and Delphi) emerged on Windows platforms ), programmers can develop applications with exquisite user interfaces and powerful functions by means of "view as you get" programming. But in fact, to develop more flexible, practical, and efficient applications, it must involve direct API function calls. for complex and special functions, the use of class libraries and controls is often difficult to implement. In this case, the use of API functions is required.

Tip: about Hook Technology

the Windows operating system is based on the event-driven mechanism, and communication between all parts of the system is also achieved through mutual transmission of messages. However, in general, an application can only process messages from within a process or from other processes, if you want to intercept and process messages that are passed outside the process, you must adopt a technology called Hook. Hook is a very important system interface in windows. It can be used to easily intercept and process messages transmitted between other applications, in addition, some special functions that are difficult to implement by common applications can be completed. The essence of a hook is a program used to process system messages. It is called by the system and mounted to the system. It is worth noting that the hook technology has become the core technology of many types of Windows software, such as screen capturing, spam filtering, and advanced software interface customization.

Related Article

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.