In fact, the SDK is short for software development kit, which means "software development kit" in Chinese ". This is a widely used term. It can be said that the collection of documents, examples, and tools used to assist in the development of a certain type of software can be called "sdks ". In this series of tutorials, we will only discuss a subset of the general SDK-the SDK used to develop applications on the Windows platform.
In fact, the above is just a general concept of the SDK. Is it so easy to understand what the SDK is? I'm afraid it's not that easy! In order to explain what the SDK is, we have to introduce the concepts of API, dynamic link library, and import/export library. ^ _ ^, Don't be afraid, that is, just a few new terms. I realized that learning new terms is actually learning new terms, new concepts, and new terms at the end of the University.
The first thing to contact is the "API", that is, the application programming interface, which is actually a call interface left by the operating system for the application, by calling the API of the operating system, an application enables the operating system to execute commands (Actions) of the application ). In fact, as early as the DOS era, there was an API concept, but at that time the API was provided in the form of Interrupt calls (INT 21 h, all applications running under DOS use the operating system functions directly or indirectly through interrupt calls, for example, if you set Ah to 30 h and call int 21 h, you can get the dos OS version number. In Windows, system APIs are provided through function calls. In Windows, you need to call the getversionex () function. In this case, the dos api is "thinking in assembly language", while the Windows API is "thinking in advanced language. DOS APIs are part of system programs. They are loaded into the memory together with the system and can be found through the interrupt vector table. What about Windows APIs? To understand this problem, we have to introduce this concept-DLL.
DLL (also an abbreviation, I feel that there are many acronyms in the IT industry), that is, dynamic link library (dynamic link library ). We often see files in. dll format. These files are dynamic link library files, but they are also executable files. Unlike. EXE files,. DLL files cannot be executed directly. They are usually imported by. EXE during execution, which contains some resources and executable code. In fact, the three modules of windows are provided in the form of DLL (kernel32.dll, user32.dll, gdi32.dll), which contains the Execution Code of API functions. To use the API functions in DLL, we must have an API function declaration (. h) and its import to the database (. lib), the function prototype declaration is not difficult to understand, so what is the purpose of importing data into the database? For the moment, we first understand that import and export are used to find the API entry point in the DLL.
Therefore, in order to use API functions, we need to have corresponding APIs. H and. the SDK provides a complete set of related files, examples, and tools required to develop Windows applications ". So far, we have explained the meaning of the SDK.
Because the SDK contains the required information for using APIs, it is often called "SDK programming" to develop Windows applications using only APIs ". APIs and sdks are essential for developing Windows applications. Therefore, other programming frameworks and libraries are built on them, such as VCL and MFC, although they have a higher degree of abstraction than "SDK programming", it does not prevent them from directly Calling API functions whenever necessary.