How Windows Works

Source: Internet
Author: User

The central idea of how Windows works

The central idea of how Windows works is the concept of "dynamic linking." Windows itself has a large set of functions that the application invokes to implement its user interface and display text and graphics on the screen. These functions are implemented in a dynamic-link library. The names of these files are prefixed with a suffix. DLL, or sometimes with a suffix. Exe.

These files are usually placed in:

\Windows\System Sub-directories
\winntisystem Sub-directories
\winntisystem32 Sub-directories

Most of the functions called by Windows programs are actually based on these 3 dynamic libraries

The kernel (kernel) is responsible for the traditional work of the operating system, including memory management, file input/output, and task management.
User refers to the user interface and is responsible for all window management.
GDI is the graphics device interface that is responsible for displaying text and graphics on a screen or printer.

Windows comes with thousands of functions for application invocation. Each function has a well-defined name, such as CreateWindow. Don't guess, this function is used to build windows for the program. All functions that an application may invoke must first be declared in the header file.

In a Windows program, what is the difference between calling a Windows function and a library function (such as strlen) that invokes C language?

Simply from the point of view of invocation, there is no difference. The main difference is that the machine code of the C library function is directly linked to your program code, while the Windows function is placed in a DLL outside of your program.

When the Windows program runs, it finds the entry address of the internal functions of each DLL in its own body through a process called dynamic linking. The exe file for each Windows contains the various dynamic-link libraries it uses and the reference address (reference) of the functions in the library. The called function needs to be loaded into memory (if it is not in memory yet).

How Windows Works

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.