The source of the underlying function when programming

Source: Internet
Author: User

We use a lot of functions when programming, based on my superficial understanding. Divide them into classes first.

One: C run-time library functions C + + run-time library functions

These things as long as the installation of compilers, such as VC + + VC will bring their own.

Two: API functions

API functions are functions implemented by the operating system to implement specific functions for user-friendly design of applications, and API functions are also implemented in C language functions.

The WIN32 API is the application programming interface of the MICROSOFTWINDOWS32-bit platform, and Microsoft's operating system and Apple's operating system provide API estimates that are not the same.

Three: System Development Framework Library

such as what MFC QT these things, they to put some common features using C run-time library functions & C + + Runtime library functions & API functions implemented, and then encapsulated into functions.

For developers to call.

Four: Other application-level libraries. For example, most of the controls sold by Hewlett Packard are based on the C run-time library function & C + + Runtime library function &api function development.

Ps:

I reckon that, as long as the CPU's instruction set is similar, C's code is completely cross-platform. But APIs are different, and API functions are functions provided by the operating system.

No matter what the function, what kind of tricks to play, and ultimately by the Assembly to achieve.

C language is a language, C + + is a strengthened version of the language. However, the C library is not a language, but a collection of functions developed in a language.

The set of API functions is provided by the operating system or development environment and appears as a DLL.

There are three main dynamic connection libraries: Windows kernel Library (Kernel32.dll), Windows user Interface Management Library (User32.dll), Windows Graphics Device Interface Library (Gdi32.dll), which together form the Win32 API functions.
Windows Kernel Library (Kernel32.dll): all the underlying core functions such as task management, memory management, process thread file management, etc. are all in this dynamic connection library;
Windows user Interface Management library (User32.dll): Window Management, menu management, communication and other related functions are in the dynamic connection library;
Windows Graphics Device Interface Library (Gdi32.dll): A collection of all functions on a graphics device.
All of the function prototype descriptions in the three dynamic connection libraries are declared in the header file Windows.h, so don't forget to include the header file when using the API for programming.

Of course, this is only the main three dynamic connection library, other more commonly used network services (Winsock32.dll), multimedia Services (Winmm.dll) and so on.

Xxxxxxxxxxxxxx

Because my ability is relatively shallow, if there is a summary of the wrong place, please remind me a lot.

Thank you

The source of the underlying function when programming

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.