


Win32 SDK Basics (1) Detailed explanation of Windows program classification and directories where libraries and header files are located
1. Windows program classification
1. Console program
Windows Dos program does not have its own window and needs to use the Dos window for user interaction. The main function:
int main() { return 0; }
2. Windows window program
Visible programs under the windows system basically belong to this kind, including word, excel, etc., main function :
int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow)
{...}
3. The dynamic link library dll
depends on the host program to call and execute, and cannot be executed by itself. The host program will only enter the memory after calling the interface. Function:
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) {...}
4, staticLibrary program lib
has no entry function and cannot be executed, so it cannot be entered into the memory. The host function reads the code directly from the hard disk. Then copy a copy of the code into your own process.
2. Classification of compilation tools under VC
1. Compiler CL.exe
is used to translate the source code into the directory where the target code
is located:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe
2. Connector LINK.exe
is used to connect the target code and library to generate the final file.
Directory:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\LINK.exe
3. Resource compiler RC.exe
The function is to compile the resources and finally save them into the final file through the connector
Directory (under vs2015)::
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\x64\RC.exe
3. Common VC libraries
1, kernel32.dll
provides thread, process, and memory management etc. Core API
2, user32.dll
provides window, message and other API
3, gdi32.dll
provides API of drawing
The path of the above three libraries:
C:\Windows\System32
4. Under VC Standard header file
1, windef.h
windows’data type
2, winbase.h
contains kernel32 .dll all API declarations
3, wingdi.h
contains all gdi32.dll API declarations
4, winuser.h
contains The API declarations of all user32.dll
5, winnt.h
contain support for UNICODE character set
6, windows.h
A collection of all windows header files
The directory where all the above header files are located (under vs2015):
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\
The above is the detailed content of Win32 SDK Basics (1) Detailed explanation of Windows program classification and directories where libraries and header files are located. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Multithreading in the language can greatly improve program efficiency. There are four main ways to implement multithreading in C language: Create independent processes: Create multiple independently running processes, each process has its own memory space. Pseudo-multithreading: Create multiple execution streams in a process that share the same memory space and execute alternately. Multi-threaded library: Use multi-threaded libraries such as pthreads to create and manage threads, providing rich thread operation functions. Coroutine: A lightweight multi-threaded implementation that divides tasks into small subtasks and executes them in turn.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

Python binary library (.whl) download method explores the difficulties many Python developers encounter when installing certain libraries on Windows systems. A common solution...

Solving the problem of slow Photoshop startup requires a multi-pronged approach, including: upgrading hardware (memory, solid-state drive, CPU); uninstalling outdated or incompatible plug-ins; cleaning up system garbage and excessive background programs regularly; closing irrelevant programs with caution; avoiding opening a large number of files during startup.

Efficient reading of Windows system logs: Reversely traverse Evtx files When using Python to process Windows system log files (.evtx), direct reading will be from the earliest...

How to implement Windows-like in front-end development...

Multithreading is an important technology in computer programming and is used to improve program execution efficiency. In the C language, there are many ways to implement multithreading, including thread libraries, POSIX threads, and Windows API.

Why can't my code get the data returned by the API? In programming, we often encounter the problem of returning null values when API calls, which is not only confusing...
