Win32 API Reference: Process and Thread Management

Overview

This section of the Win32 API provides functions for creating, managing, and synchronizing processes and threads. Understanding these concepts is fundamental to developing robust and efficient Windows applications.

Processes are independent instances of a program, each with its own memory space. Threads are lightweight units of execution within a process that share the process's memory space. Effective management of both is crucial for multitasking and concurrency.

Key Concepts

Commonly Used Functions

CreateProcess

Creates a new process and its primary thread. The new process is the executable version of the calling process's copy of the executable file.

Learn More

ExitProcess

Terminates the calling process and all its threads.

Learn More

GetCurrentProcess

Returns a pseudo-handle for the current process. A pseudo-handle is a unique identifier for the current process that is only valid within the current process.

Learn More

CreateThread

Creates a new thread that begins execution in the common address space of the calling process.

Learn More

ExitThread

Terminates the calling thread. It does not return a value.

Learn More

GetCurrentThread

Returns a pseudo-handle for the current thread. The handle is local to the calling process and has the same parity as the pseudo-handle returned by GetCurrentProcess.

Learn More

WaitForSingleObject

Waits until the specified object is in the signaled state or the time-out interval elapses.

Learn More

CreateMutex

Creates or opens a mutex object.

Learn More

CreateSemaphore

Creates a semaphore or opens an existing one.

Learn More

CreateEvent

Creates or opens a named or unnamed event object.

Learn More

Resources