Windows Programming: Core APIs

This section provides comprehensive documentation for the core Application Programming Interfaces (APIs) fundamental to Windows programming. Understanding these APIs is crucial for developing robust and efficient Windows applications.

Process and Thread Management

Learn how to create, manage, and synchronize processes and threads, which are the building blocks of multitasking in Windows.

CreateProcess

Creates a new process and its primary thread.

BOOL CreateProcess( ... );

GetCurrentProcess

Retrieves a pseudo-handle for the current process.

HANDLE GetCurrentProcess( void );

CreateThread

Creates a thread to execute within the virtual address space of the calling process.

HANDLE CreateThread( ... );

ExitProcess

Terminates the calling process and all its threads.

VOID ExitProcess( UINT uExitCode );

Memory Management

Explore functions for allocating, accessing, and freeing memory within your applications.

VirtualAlloc

Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

LPVOID VirtualAlloc( ... );

VirtualFree

Releases, decommits, or both, a whole region of pages.

BOOL VirtualFree( ... );

GlobalAlloc

Allocates the specified number of bytes from the heap.

HGLOBAL GlobalAlloc( UINT uFlags, SIZE_T dwBytes );

GlobalFree

Frees the specified global memory object and invalidates its handle.

HGLOBAL GlobalFree( HGLOBAL hMem );

Inter-Process Communication (IPC)

Discover mechanisms for enabling different processes to communicate and share data.

CreatePipe

Creates an unnamed pipe, a unidirectional data-flow mechanism.

BOOL CreatePipe( ... );

CreateMutex

Creates or opens a named or unnamed mutex object.

HANDLE CreateMutex( ... );

CreateEvent

Creates or opens a named or unnamed event object.

HANDLE CreateEvent( ... );

System Information and Services

Access information about the operating system, hardware, and manage system services.

GetSystemInfo

Returns information about the current system.

VOID GetSystemInfo( LPSYSTEM_INFO lpSystemInfo );

GetComputerName

Retrieves the name of the computer on which the calling process is running.

BOOL GetComputerName( ... );