Processes
This section provides information about the Windows API functions and structures related to process management. Processes are fundamental units of execution in Windows, each with its own address space, resources, and security context.
Key Concepts
- Process Creation: How to create new processes using functions like
CreateProcess. - Process Information: Retrieving details about running processes, such as process ID, priority, and environment variables.
- Process Termination: How to terminate processes gracefully or forcefully.
- Inter-Process Communication (IPC): Mechanisms for processes to communicate with each other.
Core APIs
The following table lists some of the most commonly used APIs for process management:
| Function/Structure | Description |
|---|---|
CreateProcess |
Creates a new process and its primary thread. The new process runs the specified executable file. |
GetCurrentProcessId |
Retrieves the unique identifier of the current process. |
GetCurrentProcess |
Retrieves a pseudo handle for the current process. |
ExitProcess |
Terminates the calling process and all of its threads. |
GetProcessInformation |
Retrieves specific information about a process. |
PROCESSENTRY32 structure |
Defines an entry in the process snapshot. Used with CreateToolhelp32Snapshot. |
OpenProcess |
Retrieves a handle to a process that has the specified access rights. |