Fact-checked by Grok 2 weeks ago

Windows API

The Windows API, also known as the Win32 API, is a comprehensive set of application programming interfaces (APIs) provided by that serves as the native programming interface for developing and server applications on the Windows operating system, enabling direct interaction with core system services, hardware, and user interfaces across 32-bit and 64-bit platforms. Originating from the 16-bit Windows APIs introduced in the late , it evolved into the 32-bit Win32 API with the release of in 1993, providing a stable foundation for low-level system access while supporting for legacy applications. Key components include the Windows UI API for creating and managing graphical windows, the (GDI) for rendering graphics and text, the Windows Shell API for and interactions, and specialized sets like , networking, and APIs, all organized into functional groups known as API sets to ensure modular updates without breaking existing code. Primarily designed for use with C and C++ languages, the Windows API allows developers to build high-performance applications requiring precise control over resources, such as system utilities, games, and , and remains integral to Windows development even alongside modern frameworks like WinRT and .NET.

Fundamentals

Definition and Scope

The Windows API serves as the foundational programming for interacting with the Windows operating , comprising a comprehensive collection of functions, , and protocols primarily exported by dynamic-link libraries (DLLs) such as kernel32.dll, user32.dll, and gdi32.dll. These DLLs encapsulate core functionalities: kernel32.dll provides low-level operating services including and process handling; user32.dll manages elements like messages and windows; and gdi32.dll handles operations for rendering and display. This structure enables developers to access Windows capabilities through standardized entry points, ensuring portability across compatible Windows versions while leveraging hardware and resources efficiently. The scope of the Windows API spans from low-level kernel-mode interactions, such as process creation and thread synchronization via functions like CreateProcess in kernel32.dll, to high-level user-mode features, including window management with CreateWindow in user32.dll. This broad range supports operations critical to system stability and , allowing applications to interface directly with the operating system's , file systems, and hardware abstractions without requiring proprietary extensions. The API's design emphasizes modularity, with functions grouped into logical sets that abstract underlying complexities, facilitating both performance-critical tasks and intuitive application development. While the classic Win32 API represents the core C-style procedural interface for traditional desktop applications, the broader extends to include object-oriented paradigms like the (COM), which enables reusable binary components through interfaces such as IUnknown, and the (WinRT), a metadata-driven for building universal apps with language projections in C++, C#, and . This distinction allows the Windows API to evolve beyond 32-bit legacy constraints, incorporating modern standards for security, asynchronous programming, and cross-platform compatibility in newer Windows environments. COM and WinRT build upon Win32 foundations but introduce projection layers to abstract implementation details, promoting across diverse development ecosystems. Primary use cases for the Windows API include developing native desktop applications that require direct system access, such as utilizing primitives; creating system utilities for tasks like file manipulation and registry access via kernel functions; and facilitating user-mode interactions with kernel-mode drivers through APIs like those in advapi32.dll for and . These applications leverage the API's stability to ensure seamless with Windows features, from legacy Win32-based tools to contemporary hybrid solutions incorporating or WinRT components.

Architectural Overview

The Windows API operates within a hybrid architecture that delineates user mode and mode to ensure and . User-mode components, where applications and higher-level services execute, are isolated from the kernel mode, which handles core operating functions such as , management, and allocation. This separation prevents user-mode faults from crashing the entire , with transitions between modes enforced through protected calls. At the heart of this design is the (), which provides the foundational executive services and object manager, while the Win32 subsystem serves as the primary user-mode layer, translating application requests into native operations. The modular design of the Windows API relies heavily on dynamic-link libraries (DLLs) to organize functionality and promote reusability. Central to this is ntdll.dll, which acts as the system service dispatcher in user mode, exporting the Native API functions (prefixed with Nt or Zw) that directly with the via system service dispatch tables. Subsystem DLLs, such as kernel32.dll, build upon ntdll.dll to implement the Win32 API's base services, including and management, I/O, and primitives; these DLLs forward low-level requests to ntdll.dll for invocation while providing a higher-level, abstracted for developers. This layered DLL approach allows for versioned API sets and facilitates updates without disrupting dependent applications. Inter-component communication in the Windows API spans both local and remote scenarios, primarily through Local Procedure Call (LPC) and (RPC) mechanisms. LPC enables efficient, secure between user-mode processes and the or other subsystems on the same machine, using port objects managed by the 's LPC facility to handle asynchronous requests and responses without . For distributed interactions, RPC extends this model across network boundaries, allowing client applications to invoke procedures on remote servers as if they were local calls, with the RPC runtime handling marshaling, authentication, and transport via protocols like TCP/IP. These mechanisms underpin subsystem interactions, such as the Win32 subsystem communicating with the . The Windows API encompasses multiple layers that support interoperability and extensibility, with Win32 forming the foundational layer for native C/C++ development, exposing functions through headers like . Above Win32 sits the (COM), a binary standard for object-oriented components that enables language-agnostic reuse and is integral to advanced services like and ; COM objects often delegate to Win32 primitives for implementation. Further abstraction is provided through .NET interop, where managed code in the .NET Framework or .NET Core uses Platform Invoke (P/Invoke) to call Win32 and COM APIs, bridging unmanaged native code with managed environments while respecting the underlying user-kernel boundaries. These layers depend hierarchically: .NET relies on COM and Win32 for system access, COM on Win32 for core operations, and all ultimately on the NT kernel via ntdll.dll.

Core Services

Base Services

Base services in the Windows API encompass the essential low-level functions for and management, memory allocation, input/output operations, and console/ handling, forming the foundation upon which applications interact with the operating system's core resources. These services are primarily exposed through the kernel32.dll , enabling developers to build robust, efficient programs without direct access. By providing handle-based abstractions, these APIs ensure secure and portable resource management across Windows versions. Process and thread management APIs allow applications to create, query, and control execution units within the system. The CreateProcess function initiates a new process and its primary thread, executing the specified module in the security context of the calling process while allowing customization of startup information, such as the working directory and environment block. For introspection, GetCurrentProcessId retrieves the unique identifier of the current process, a DWORD value used for inter-process communication or logging. Thread creation is handled by CreateThread, which allocates a new thread in the calling process's virtual address space, specifying the thread procedure, parameters, stack size, and creation flags to control scheduling and security attributes. These functions support multiprogramming by enabling concurrent execution, where threads share the process's address space and resources but maintain independent execution contexts. Memory allocation services provide mechanisms for dynamic at both and virtual address levels. HeapAlloc allocates a of from a specified —typically obtained via HeapCreate or GetProcessHeap—ensuring the is non-movable and at least the requested size in bytes, with optional zero-initialization via the HEAP_ZERO_MEMORY flag. For larger-scale or page-aligned allocations, VirtualAlloc reserves, commits, or modifies regions in the process's , operating at page (typically 4 ) and supporting protection constants like PAGE_READWRITE, which grants both read and write access to the committed pages. These APIs differ in : allocations suit frequent small , while virtual allocations optimize for performance in scenarios like buffer management or executable code loading. File I/O operations rely on handle-based APIs for creating, reading, and writing to files or devices, supporting both synchronous and asynchronous modes. CreateFile opens an existing file or creates a new one, returning a for subsequent operations and specifying access rights (e.g., GENERIC_READ, GENERIC_WRITE), sharing modes, creation disposition, and attributes like FILE_ATTRIBUTE_NORMAL. Data transfer uses ReadFile to retrieve bytes from the file into a at the current file pointer position, and WriteFile to output bytes from a , both functions blocking until in synchronous mode or returning immediately in asynchronous mode when the FILE_FLAG_OVERLAPPED flag is set during file creation. , also known as overlapped I/O, employs an OVERLAPPED structure to track operation progress and , allowing non-blocking file access essential for high-throughput applications like servers. Console and environment services facilitate interaction with standard I/O streams and process-specific configurations. GetStdHandle retrieves pseudohandles to the standard devices—STD_INPUT_HANDLE for input, STD_OUTPUT_HANDLE for output, and STD_ERROR_HANDLE for error streams—enabling console applications to redirect or manipulate these streams programmatically. Environment management is provided by SetEnvironmentVariable, which sets or modifies a named in the current process's environment block, affecting subsequent calls to GetEnvironmentVariable and child processes unless explicitly blocked. These services are crucial for command-line tools and scripts, allowing dynamic configuration without altering system-wide settings.

Advanced Services

Advanced services in the Windows API extend base functionality by providing specialized mechanisms for , persistent , resource optimization, and regional adaptations, enabling developers to build robust, multithreaded applications that interact efficiently with system states. These services are essential for scenarios requiring coordinated execution, persistence across sessions, under varying power conditions, and accurate handling of time-based operations in diverse locales. Synchronization objects form a cornerstone of multithreading support, allowing threads to coordinate access to shared resources and signal completion of operations. Mutexes, created using the CreateMutex function, enforce by granting ownership to only one thread at a time, preventing race conditions in critical sections. Threads acquire mutex ownership via WaitForSingleObject, which blocks until the object is available or a specified timeout expires, returning a handle for release with ReleaseMutex. Semaphores, initialized through CreateSemaphore, extend this by permitting a configurable number of simultaneous threads—defined by an initial and maximum count—to access resources, ideal for managing bounded pools like connection limits. Events, generated by CreateEvent, facilitate inter-thread communication; manual-reset events maintain a signaled state until explicitly reset, while auto-reset events signal only one waiting thread, supporting patterns like producer-consumer . The registry API offers a structured approach to persistent configuration storage, treating the registry as a tree-like database for key-value pairs that survive process termination. RegOpenKeyEx opens an existing or creates a new subkey under a parent handle—such as HKEY_LOCAL_MACHINE—with specified access rights, yielding a handle for read/write operations while supporting recursive navigation. Once opened, RegQueryValueEx retrieves the data type (e.g., REG_SZ for strings, REG_DWORD for integers) and value contents for a named entry, populating buffers with the raw data and size, which is crucial for loading application settings or hardware configurations at startup. Corresponding functions like RegSetValueEx and RegCloseKey complete the cycle, ensuring secure, atomic updates with error handling via return codes. Power and performance services enable optimization of scheduling and awareness of constraints, particularly in -powered or resource-limited environments. SetThreadPriority modifies a 's base priority relative to its process class, using values from THREAD_PRIORITY_IDLE (-15) to THREAD_PRIORITY_TIME_CRITICAL (15), or special flags like THREAD_MODE_BACKGROUND_BEGIN to deprioritize non-foreground tasks and conserve CPU cycles. This influences the scheduler's time-slice allocation, though priorities above 11 require debug privileges to avoid system instability. GetSystemPowerStatus queries the overall power state, filling a SYSTEM_POWER_STATUS structure with details like AC/DC mode, charge percentage (0-100 or 255 for unknown), low-battery flags, and charging status, allowing applications to throttle operations or warn users proactively. Time and localization services manage date-time retrieval and zone adjustments, with built-in support for regional variations evolving alongside Unicode integration for global compatibility. GetLocalTime fetches the current date and time in the system's locale, converting UTC via the time zone bias and populating a SYSTEMTIME structure with components like year, month, day-of-week, hour, minute, second, and millisecond. SetTimeZoneInformation updates the active time zone by specifying bias minutes from UTC, names for standard and daylight periods, and SYSTEMTIME transition rules, requiring the SE_TIME_ZONE_NAME privilege for security. Unicode support emerged natively in Windows NT 3.1 (1993) through wide-character ("W") API variants using UCS-2 encoding (a subset of UTF-16), contrasting with ANSI ("A") code-page handling, while Windows 95/98/Me relied on the Microsoft Layer for Unicode (MSLU), introduced in 2001 as a thunking layer to map Unicode calls to ANSI equivalents for those systems. This progression ensures functions like GetLocalTime and SetTimeZoneInformation properly render localized strings and formats, such as date separators or AM/PM indicators, across languages without data loss.

User Interface Services

Graphics Device Interface

The Graphics Device Interface (GDI) is a core component of the Windows API that provides device-independent 2D graphics and formatted text rendering capabilities for applications targeting displays and printers. It abstracts hardware details through device drivers, allowing developers to draw shapes, lines, text, and images without direct interaction with specific output devices. Introduced in early Windows versions, GDI remains integral to legacy and compatibility-focused applications, supporting raster and vector operations via a unified programming model. Central to GDI operations are device contexts (DCs), which serve as logical drawing surfaces representing physical or memory-based output targets. A device context is identified by a of type HDC and encapsulates attributes such as graphic objects (pens, brushes, fonts) and rendering modes. Applications obtain an HDC for a window's client area using the GetDC function, which retrieves a common or class-specific DC depending on the window's style, enabling drawing within that surface. Once drawing is complete, ReleaseDC must be called to free the DC and return resources to the system, preventing handle leaks and ensuring efficient . DCs support various types, including memory DCs for off-screen rendering and printer DCs for output , facilitating consistent across diverse . GDI's drawing primitives enable basic 2D through functions that operate on the current , utilizing selected graphic objects for styling. For lines, LineTo draws from the current pen position to a specified (excluding the endpoint itself), with the pen defining attributes like color, width, and style (solid, dashed); the current position is updated or set via MoveToEx. Shapes like are rendered using Rectangle, which draws the outline with the current pen and fills the interior with the selected brush, where brushes specify fill patterns, colors, or gradients (e.g., solid, hatched). Text output is handled by TextOut, which renders a character string at a given using the currently selected font, text color, and ; fonts are managed via creation functions like CreateFont and selection into the DC with SelectObject, supporting and raster fonts for scalable . These primitives prioritize simplicity and portability, forming the foundation for elements and printed output. GDI supports through bitmap handling and vector storage via metafiles, allowing efficient image manipulation and playback. CreateCompatibleBitmap generates a device-compatible matching the format of the associated , suitable for off-screen drawing or blitting to the screen; this enables memory-based rendering before transfer to visible surfaces using functions like BitBlt. For portability, enhanced metafiles (EMFs) record sequences of GDI calls as scalable records, which can be replayed with PlayEnhMetaFile to redraw the content on any compatible , preserving fidelity across resolutions and devices. Despite its robustness, GDI exhibits limitations in modern scenarios, particularly due to its software-based rendering on the CPU, which lacks and struggles with high-resolution displays, complex animations, or large-scale graphics, leading to performance bottlenecks. As a result, recommends for new 2D graphics development in Windows, as it leverages GPU acceleration via for improved efficiency and subpixel , while maintaining compatibility with GDI through interop layers; GDI continues to be supported for but is increasingly supplemented or replaced in performance-critical applications.

User Interface Primitives

The Windows API provides fundamental primitives for creating and managing , forming the basis of event-driven in applications. Window creation begins with registering a using the RegisterClassEx function, which defines shared attributes such as the window procedure, class styles, background brush, and instance via a WNDCLASSEX structure. This registration associates a unique name with these properties, enabling multiple windows to share behavior without redundant definitions; local classes are process-specific, while global classes use the CS_GLOBALCLASS style for broader availability. Once registered, the CreateWindowEx function (with CreateWindow as a macro alias) instantiates an overlapped, pop-up, or child by specifying the class name, window title, styles, position, size, parent , menu, instance, and creation parameters. The function returns a (HWND) to the new upon success, triggering messages like WM_NCCREATE and WM_CREATE for initialization. Window styles, defined as bitwise flags in the dwStyle parameter of CreateWindowEx, dictate the window's appearance and behavior, such as borders, scrollbars, and resizability. For instance, the WS_OVERLAPPEDWINDOW style combines WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX to create a standard resizable window with a title bar, system menu, thick frame, and minimize/maximize buttons, equivalent to WS_TILEDWINDOW. Extended styles via dwExStyle further customize aspects like or , but core styles remain modifiable post-creation using functions like SetWindowLong. These styles ensure windows integrate seamlessly with the , supporting default positioning via CW_USEDEFAULT for overlapped windows. After creation, window management involves functions like ShowWindow to control visibility and state, activating and displaying the based on commands such as SW_SHOWNORMAL for the default restored size or SW_SHOWMAXIMIZED for full-screen presentation. The takes the and show command as parameters, returning nonzero if the was previously visible; on the initial call from WinMain, it respects the nCmdShow parameter unless overridden by STARTUPINFO. This primitive enables dynamic lifecycle control, such as minimizing or restoring without recreating them. Event-driven programming relies on the message loop, a core primitive that retrieves, translates, and dispatches messages from the thread's to window procedures. The loop typically uses GetMessage to fetch the next into a MSG structure, blocking until one arrives or WM_QUIT terminates it (returning 0). If a is retrieved successfully, TranslateMessage converts virtual-key codes to messages for input, posting them back to the . Finally, DispatchMessage routes the to the target window's procedure for processing, enabling responsive handling of events like user interactions. A basic implementation appears as:
while (GetMessage(&msg, NULL, 0, 0) > 0) {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
}
This structure ensures threads with windows remain interactive, processing sent and posted messages efficiently. Input handling primitives facilitate direct access to user devices without relying on higher-level controls. For input, GetAsyncKeyState queries the state of a virtual key (e.g., VK_ESCAPE), returning a short value where the most significant bit indicates if the key is down and the least significant bit signals a transition since the last call, though the latter is unreliable in multitasking environments. position can be manipulated via SetCursorPos, which relocates the cursor to specified screen coordinates (in pixels), succeeding only if within any ClipCursor-defined bounds and requiring WINSTA_WRITEATTRIBUTES access on the input desktop. operations start with OpenClipboard, which locks the system clipboard to the calling or specified window, preventing modifications by others until CloseClipboard is called, and returns nonzero on success. These functions provide low-level control for custom input processing in windows. Menu and accelerator support enables navigation primitives through CreateMenu and LoadMenu. The CreateMenu function allocates an empty menu object, returning a (HMENU) that can be populated with items using AppendMenu or InsertMenuItem and attached to a via SetMenu. Resources are automatically freed when the menu is assigned to a , but DestroyMenu is required otherwise. For resource-based menus, LoadMenu retrieves a predefined template from the application's by name or ID, loading it into memory and returning the handle for immediate use or assignment. Accelerators, defined in resource files, map keyboard shortcuts to menu commands, integrating seamlessly with the message loop for efficient user interaction.

Common Controls and Dialogs

The common controls library in the Windows API provides a set of reusable components for building graphical applications, such as buttons, progress bars, and more complex widgets like tree views and list views, all hosted within standard windows. To initialize these controls, applications call the InitCommonControlsEx function, which loads the Comctl32.dll and registers the necessary window classes using an INITCOMMONCONTROLSEX structure that specifies the desired control classes via flags like ICC_STANDARD_CLASSES. This ensures the controls are available before creating their windows with CreateWindow or CreateWindowEx, specifying class names such as WC_TREEVIEW for tree views or WC_LISTVIEW for list views. Tree-view controls (WC_TREEVIEW) display hierarchical data in an expandable , allowing users to navigate parent-child relationships, such as directories or organizational charts. Developers insert items using the TVM_INSERTITEM message with a TVINSERTSTRUCT that includes a TVITEM to define attributes like text, images from an image list, and state (e.g., selected or expanded). The TVITEM supports retrieval and modification of item properties via TVM_GETITEM and TVM_SETITEM messages, enabling dynamic updates like expanding nodes on user interaction through notifications such as TVN_ITEMEXPANDING. List-view controls (WC_LISTVIEW), on the other hand, present collections of items in views like icon, small icon, list, report, or large icon, ideal for displaying tabular data such as lists in Explorer. Items are added via LVM_INSERTITEM with an LVITEM specifying subitems, columns, and icons, while features like virtual mode (LVS_OWNERDATA) allow handling large datasets without loading all items into memory. Dialog boxes facilitate user input through predefined or custom forms, typically defined via resource templates in the application's that specify controls, , and initial values. The DialogBox function creates a dialog, which blocks with the until dismissed (e.g., via or ), processing messages in a dialog procedure (DLGPROC) that handles events like WM_COMMAND. In contrast, CreateDialog produces a modeless dialog that allows with other windows, returning immediately with a for sending messages directly. Standard file open and save dialogs, such as those invoked by GetOpenFileName, exemplify resource-based templates integrated with common controls for functionality like thumbnail previews. Property sheets extend dialog functionality into multi-page interfaces for configuring complex settings, such as system properties panels. Each page is created with CreatePropertySheetPage, populating a PROPSHEETPAGE structure with a dialog template, procedure, and title, then added to a sheet via PropertySheet which manages navigation tabs or wizards. Wizards, a sequential variant, use similar pages but with PSH_WIZARD flags for forward/back navigation without tabs, guiding users through steps like installation processes. The common controls evolved significantly with version 6 of Comctl32.dll, introduced in , which integrates support for visual styles and themes to align with the operating system's appearance, such as Luna or schemes. To enable this, applications include a manifest specifying dependency on Comctl32 version 6 or use InitCommonControlsEx with appropriate flags, allowing controls to render with themed elements like gradients and rounded corners via the (UX) theme . This version enhances accessibility and consistency but requires explicit activation, as earlier versions default to classic appearance.

Shell Integration

The Windows Shell APIs enable applications to integrate seamlessly with the , , and system notification areas, allowing for enhanced user interactions such as navigating shell namespaces, managing icons, launching files through Explorer, and supporting drag-and-drop operations. These APIs are part of the broader shell namespace, which abstracts the and virtual folders into a unified structure accessible via interfaces. By leveraging these, developers can extend Explorer's functionality without directly manipulating underlying file I/O, focusing instead on shell-specific behaviors like context menus and item properties. Shell namespaces form the foundation of this integration, providing a hierarchical view of system resources that includes both physical files and virtual elements like the Recycle Bin or network locations. The IShellFolder interface is central to this, enabling applications to enumerate, display, and operate on folder contents within the shell's namespace. For instance, it supports methods like EnumObjects for listing items and GetUIObjectOf for retrieving UI handlers, such as context menus or icons, for specific shell items. To begin navigation, applications typically call SHGetDesktopFolder, which returns an IShellFolder pointer to the —the root of the shell namespace—allowing traversal to subfolders via BindToObject. This setup facilitates navigation in a shell-aware manner, treating folders as objects with display names and attributes. Taskbar and notification integration allows applications to place persistent icons in the system tray and trigger user notifications, enhancing visibility for background processes. The Shell_NotifyIcon function handles adding, modifying, or removing s from the notification area, using a NOTIFYICONDATAA structure to specify details like the icon , tooltip text, and callback messages for user interactions such as clicks. For notifications, it supports balloon tips and modern toast-like displays when the NIF_INFO flag is set, ensuring compatibility with the evolving notification area. In , these APIs remain consistent, though the centered layout repositions icons visually without altering core functionality. Applications can also query icon positions using Shell_NotifyIconGetRect for precise overlay or animation handling. Explorer extensions via shell APIs enable launching and manipulating files in a user-friendly context, mimicking native Explorer behaviors. ShellExecute performs operations on files or URLs by specifying a verb like "open" or "print," delegating to the associated application or shell handler, which simplifies tasks like opening documents without hardcoding paths to executables. For more control, ShellExecuteEx provides extended parameters, including process monitoring via a SHELLEXECUTEINFO structure. Drag-and-drop operations integrate through IDataObject, a COM interface that encapsulates transferable data formats, such as CF_HDROP for file lists, during DoDragDrop loops. Shell extensions can implement IDataObject to support dropping shell items onto custom views, enabling scenarios like rearranging desktop icons or transferring files between applications and Explorer. Recent enhancements in reflect evolving desktop paradigms, particularly with virtual desktops introduced in and refined in . The IVirtualDesktopManager interface allows programmatic management of virtual desktops, such as moving windows between them using MoveWindowToDesktop or querying active desktops via GetWindowDesktopId. This API supports multi-desktop workflows by associating windows with specific desktops, improving isolation and organization without disrupting or notification flows. In , the centered complements these by providing a streamlined UI for switching desktops via , though no new APIs specifically target the centering; existing shell notifications adapt to the layout automatically. These features ensure applications remain responsive across desktop environments.

Network and System Services

Network Communications

The Windows API provides a suite of functions and libraries for handling network communications, enabling applications to establish connections, transmit data, and manage network resources at the socket and protocol levels. Central to this is the Windows Sockets API (Winsock), which offers a standardized for TCP/IP and UDP-based networking, supporting both client and server operations across local and wide-area networks. Winsock version 2.x, introduced in and enhanced in subsequent versions, extends these capabilities with support for multiple protocols, asynchronous operations, and protocol-independent name resolution, allowing developers to build robust, cross-platform compatible network applications. To initialize a Winsock session, applications call WSAStartup, which negotiates the Winsock version (typically 2.2) and loads the necessary DLL (ws2_32.dll), returning a WSAData structure with version details and provider information. Once initialized, the socket function creates a socket descriptor for communication, specifying the address family (e.g., AF_INET for IPv4), type ( for TCP or for UDP), and protocol (IPPROTO_TCP or IPPROTO_UDP). For server-side operations, associates the socket with a local address and port, while clients use connect to establish a to a remote using a sockaddr structure. These functions form the foundation for data transmission via send and recv (or their asynchronous counterparts like WSASend and WSARecv), with error handling through WSAGetLastError. Winsock 2.x features, such as overlapped I/O for non-blocking operations and the select or WSAWaitForMultipleEvents for , enhance in multi-client scenarios. Complementing Winsock, the IP Helper API (Iphlpapi.dll) facilitates enumeration and management of network interfaces and addresses. The GetAdaptersInfo function retrieves a linked list of IP_ADAPTER_INFO structures, detailing adapter names, IP addresses, gateway addresses, and DHCP status for all network interfaces on the system. This is particularly useful for applications needing to detect connectivity changes or configure routes dynamically, though Microsoft recommends GetAdaptersAddresses for newer Windows versions due to its support for IPv6 and extended data. By querying adapter indices and mask values from these structures, developers can implement network diagnostics or adapter-specific routing without relying on external tools. For , the Windows Remote Procedure Call () API enables seamless invocation of procedures across network boundaries as if they were local calls. The RpcBindingCreate function (or its ANSI variant RpcBindingCreateA) generates a binding handle from a string representation of the , (e.g., ncacn_ip_tcp for /), and details, establishing a connection to the RPC . This handle is then used with RpcCall or interface-specific stubs for marshaling arguments and executing remote methods, supporting via security callbacks and asynchronous patterns through *RpcAsync ** functions. RPC integrates with the Microsoft Interface Definition Language (MIDL) for generating client and code, making it ideal for enterprise applications requiring over LANs or the . IPv6 support is natively embedded in Winsock 2.x and later, allowing applications to use the same API for both IPv4 and IPv6 without major code changes by specifying AF_INET6 in socket creation. Functions like getaddrinfo replace legacy gethostbyname for dual-stack resolution, returning addrinfo structures that handle IPv6 literals (e.g., [2001:db8::1]) and scoped addresses, while WSAConnectByName simplifies hostname-based connections over IPv6. This ensures forward compatibility, with Winsock automatically selecting the appropriate protocol stack based on the address family and system configuration. Integration with the Windows Firewall is achieved through the NetFwTypeLib COM library (hnetcfg.dll), which exposes interfaces for querying and modifying rules programmatically. The INetFwPolicy interface, obtained via CoCreateInstance with CLSID_NetFwPolicy2, provides access to current profiles (domain, private, public) and their INetFwRules collections. Applications can add rules using INetFwRule objects, specifying ports, protocols (TCP/UDP), and directions to authorize traffic for sockets created via Winsock, ensuring compliance with security policies without manual user intervention. This API, available since Windows XP SP2, supports elevation prompts via UAC for administrative changes and integrates with group policy for enterprise deployments.

Web and HTTP Handling

The Windows API provides several abstractions for handling web and HTTP operations, primarily through high-level interfaces that simplify interactions for applications. These APIs enable developers to perform tasks such as sending HTTP requests, parsing s, and managing connections without directly handling low-level network transports. Key components include the WinINet API for client-side HTTP operations, COM-based URL monikers for resource identification and binding, and the WinHTTP API for more advanced, server-oriented scenarios. The WinINet API, introduced in Windows 95, offers a straightforward interface for applications to access HTTP and FTP resources, making it suitable for simple, interactive client applications that integrate with Internet Explorer's behaviors like caching and . To initiate an HTTP session, developers call InternetOpen to create a , specifying the access type (direct, , or parent) and optional agent string. Subsequent operations involve InternetConnect to establish a , followed by HttpOpenRequest to prepare an HTTP request with details like the verb (e.g., GET or ), object path, and version. The request is then sent using HttpSendRequest, which transmits headers and data to the and retrieves the response, supporting features like secure connections via . WinINet automatically handles protocol details, including HTTP/1.1 compliance and support since Windows 10 version 1709, but it includes UI-dependent elements like credential prompts, limiting its use in services. For URL handling in a COM-centric approach, Windows employs URL monikers, which are objects implementing the IMoniker interface to represent and bind to network resources like web pages. Creation of a URL moniker is typically performed using the CreateURLMoniker function from urlmon.dll, which takes an optional base moniker context and a string to produce an IMoniker object. This enables asynchronous binding via IMoniker::BindToObject, which resolves the and retrieves data streams, often used in compound documents or scenarios for embedding . The related IUri interface, also from urlmon.dll and available since SP2, provides finer-grained parsing; it is instantiated via CreateUri or CoCreateInstance with CLSID_IUri, offering methods such as GetScheme to extract the , GetHost for the , and GetPath for the resource path, ensuring canonicalization and validation per 3986. These COM-based tools facilitate robust URL manipulation in legacy Win32 applications requiring integration with broader object models.) WinHTTP, available since and enhanced in subsequent Windows versions, serves as a more programmatic alternative to WinINet, optimized for server-side and non-interactive applications with stronger support for and . Initialization begins with WinHttpOpen to establish a session , configurable for features like secure protocols (SSL/TLS 1.0+). Connections are made via WinHttpConnect to a , then WinHttpOpenRequest prepares the HTTP request similar to WinINet but with additional flags for verbs and headers. Sending occurs through WinHttpSendRequest, followed by WinHttpReceiveResponse to process the reply, enabling advanced capabilities like (NTLM, Digest, Negotiate) and automatic redirects. Unlike WinINet, WinHTTP lacks built-in UI or caching, making it ideal for services, and it supports by default since , with and extensions added in Windows 8. While these APIs remain supported for Win32 desktop applications, Microsoft recommends transitioning to the Windows Runtime (WinRT) Windows.Web.Http namespace, particularly HttpClient, for Universal Windows Platform (UWP) apps to leverage modern asynchronous patterns and sandboxed networking. This shift emphasizes HttpClient for sending requests via methods like GetAsync or PostAsync, providing better integration with app isolation and future-proofing against legacy dependencies.

System Management Services

The System Management Services in the Windows API provide developers with interfaces to perform administrative tasks essential for maintaining and monitoring system health, such as controlling background services, logging events for auditing, and retrieving performance metrics. These services enable applications to interact with the (SCM), the Event Log subsystem, and the (WMI) framework, facilitating tasks like service installation, error reporting, and query-based system introspection. Unlike lower-level base services, these APIs focus on system-wide administrative operations, often requiring elevated privileges for secure execution. Service control allow programs to manage Windows services, which are long-running executable applications that support core system functions without a . The OpenSCManager function establishes a connection to the SCM on a local or remote computer, returning a to the specified database (typically SERVICES_ACTIVE) with access rights like SC_MANAGER_CONNECT for querying services or SC_MANAGER_CREATE_SERVICE for modifications. Once connected, the CreateService function creates a new object in the SCM database, specifying details such as the service binary path, display name, startup type (e.g., SERVICE_AUTO_START), and dependencies on other services. For example, an might use these to a custom , ensuring it starts automatically on ; the function requires a valid SCM and appropriate descriptors to prevent unauthorized access. Related functions like OpenService and StartService extend this control by opening existing services for configuration or initiating their execution, forming a complete lifecycle . These , part of the winsvc.h header, integrate with the Windows model to enforce access rights, such as SERVICE_START for initiating services. Event logging services support system auditing by enabling applications and services to record operational events, errors, and informational messages in structured logs viewable via the Event Viewer. The RegisterEventSource function retrieves a handle to an event source within a specified log file (e.g., Application or System), requiring the source name to be registered in the registry under HKLM\SYSTEM\CurrentControlSet\Services\EventLog for validation. With this handle, the ReportEvent function writes an event entry to the log, including parameters like event type (e.g., EVENTLOG_ERROR_TYPE), category, ID, and insertion strings or binary data for detailed descriptions. For instance, a service encountering a failure might call ReportEvent to log the incident with user-defined strings, aiding in post-mortem analysis; the function appends entries asynchronously to minimize performance impact. These APIs, declared in winbase.h, support remote logging by specifying a server name, and require DeregisterEventSource to release handles properly, ensuring thread-safe operations in multi-process environments. Designed primarily for Windows 2000 and later, they provide a standardized mechanism for auditing without direct file I/O. Performance counters offer a mechanism to monitor system and application metrics, with basic integration often involving registry queries for counter definitions and WMI for advanced retrieval. The RegQueryValueEx function from the registry reads performance counter data stored under keys like HKLM\SOFTWARE[Microsoft](/page/Microsoft)\Windows NT\CurrentVersion\Perflib, retrieving values such as counter names, indices, and help texts to build localized monitoring tools. This approach provides foundational access to counter metadata, enabling developers to enumerate available counters (e.g., utilization or usage) without specialized libraries, though it requires careful handling of registry hives for 32-bit versus 64-bit views. For broader integration, WMI exposes performance data through classes like Win32_PerfRawData_PerfOS_System, where queries can fetch real-time values like total processes or context switches. The higher-level Performance Data Helper (PDH) , such as PdhOpenQuery and PdhCollectQueryData, builds on these foundations for easier consumption, but WMI's query model allows flexible, SQL-like filtering for system-wide monitoring. These counters, introduced in early versions, abstract hardware-specific metrics into a unified interface, supporting tools like PerfMon for visualization. Windows Management Instrumentation (WMI) serves as a cornerstone for query-based system management, providing a standardized, object-oriented model to access and manipulate system data across local and remote machines. The IWbemServices interface, obtained via CoCreateInstance from the CLSID_WbemLocator, acts as the primary entry point for WMI operations, supporting methods like ExecQuery for executing WQL (WMI Query Language) statements to retrieve instances of classes such as Win32_Service or Win32_Process. For example, a management application might use IWbemServices::ExecQuery with "SELECT * FROM Win32_OperatingSystem" to gather details like OS version and build number, returning an enumerator (IEnumWbemClassObject) for iterating results asynchronously via IWbemServices::GetObjectAsync. This interface also enables instance creation or modification through PutInstance and supports namespace navigation with OpenNamespace, allowing scoped queries in hierarchical structures like root\cimv2. Defined in wbemcli.h and part of the WMI COM API, IWbemServices integrates with DCOM for remote access, requiring authentication and impersonation levels for security; it addresses gaps in traditional API coverage by unifying access to hardware, software, and configuration data in a scriptable, extensible format compliant with CIM standards. Since its introduction in Windows 2000, WMI has evolved to support modern scenarios like performance monitoring and policy enforcement, with providers extending its capabilities for custom classes.

Programmatic Usage

Calling Mechanisms

The Windows API employs the __stdcall calling convention for the majority of its functions on 32-bit platforms, which dictates how parameters are passed and the stack is managed during invocation. In this convention, arguments are pushed onto the stack from right to left, ensuring efficient access for variable-argument functions if needed. The called function (callee) is responsible for cleaning up the stack by popping its own arguments after execution, which simplifies caller code but requires fixed argument counts to avoid mismatches. On 64-bit Windows platforms, the API uses the Microsoft x64 calling convention, a register-based fast-call mechanism where the first four integer or pointer parameters are passed in registers RCX, RDX, R8, and R9; the first four floating-point parameters in XMM0–XMM3; and additional parameters are pushed onto the stack from right to left by the caller, who also manages stack cleanup. This convention supports efficient performance on x64 and ARM64 architectures without the need for callee stack adjustment. In C and C++ programming for 32-bit targets, developers specify this convention using the __stdcall keyword in function declarations, such as int __stdcall MyFunction(int param1, int param2);, and macros like WINAPI or APIENTRY often alias it for API prototypes. For 64-bit compilations, the x64 calling convention is used by default, and keywords like __stdcall are ignored or mapped to it. Invocation of Windows API functions occurs via either static or dynamic linking, each offering distinct trade-offs in performance and flexibility. Static linking resolves function addresses at by incorporating libraries (.lib files) into the , ensuring immediate availability but requiring the target DLL to be present at load time or risking application failure. In contrast, dynamic linking defers resolution to : LoadLibrary (or LoadLibraryEx) loads the DLL into the process space and returns a module handle, while GetProcAddress retrieves the address of a specific exported function using its name or ordinal. This approach eliminates the need for libraries, enables conditional loading based on availability, and supports error handling, such as calling FreeLibrary to unload the module when done. To support , Windows API functions often provide parallel ANSI and Unicode variants, identifiable by suffixes in their names. The "A" suffix denotes the ANSI version, which uses single-byte characters for compatibility with legacy systems. The "W" suffix indicates the version, employing wide characters in UTF-16 encoding as the default for modern Windows platforms to handle global text natively. For instance, CreateWindowA processes ANSI strings, whereas CreateWindowW accepts UTF-16 strings; generic prototypes without suffixes (e.g., CreateWindow) resolve to "W" variants when Unicode is enabled via project settings or macros like UNICODE. Developers are encouraged to use Unicode variants for new applications to avoid code page limitations. On 64-bit Windows editions, the (Windows-on-Windows 64-bit) subsystem extends calling compatibility for 32-bit applications without requiring recompilation. emulates the x86 environment, translating 32-bit calls to their 64-bit counterparts where necessary and managing separate address spaces to prevent direct DLL cross-loading between bitnesses. This ensures seamless execution of legacy 32-bit code on x64 or ARM64 systems, including support for console, , and service applications, though it imposes limitations like restricted 16-bit app support due to handle size constraints. Developers can detect operation using functions like IsWow64Process to adjust behavior if needed.

Data Structures and Types

The Windows API employs a variety of fundamental data types and structures to facilitate interaction with system resources, windows, processes, and messages, ensuring portability across different architectures and character encodings. These types are defined in header files such as WinDef.h, WinNT.h, and BaseTsd.h, and are integral to the API's design for low-level programming in C and C++. They abstract underlying hardware and OS specifics, allowing developers to reference objects without direct memory management in many cases. Key handle types include HANDLE, which is a generic pointer to an object such as a file, process, or device, defined as typedef PVOID HANDLE and sized to match the platform's pointer width (32 bits on 32-bit systems, 64 bits on 64-bit systems). HWND, a handle to a window, is defined as typedef HANDLE HWND and used to identify and manipulate graphical user interface elements. Similarly, HINSTANCE represents a module's base address in memory, defined as typedef HANDLE HINSTANCE, and serves as a handle to an executable or DLL instance; it is equivalent to HMODULE in modern Windows implementations. For integer values, DWORD is a 32-bit unsigned integer ranging from 0 to 4,294,967,295, defined as typedef unsigned long DWORD, commonly used for flags, parameters, and return values across API functions. Pointer types for strings, such as LPCTSTR, provide a const pointer to a , conditionally defined as LPCWSTR (wide-character) if is enabled or LPCSTR (ANSI) otherwise, promoting code compatibility between character sets. The TCHAR macro underpins this portability, mapping to CHAR (8-bit) for ANSI builds or WCHAR (16-bit ) when is defined, enabling developers to write string-handling code that compiles for both environments without modification. For (COM) interactions, BSTR (Basic String) is a length-prefixed, Unicode string type allocated via functions like SysAllocString, ensuring safe memory management in cross-language scenarios; it includes a 4-byte length prefix followed by null-terminated OLECHAR data. Common structures encapsulate related data for efficiency. The RECT structure defines a rectangle's bounds using four LONG members—left, top, right, and bottom—representing client-area coordinates in pixels, essential for window positioning and clipping operations. The POINT structure specifies a 2D coordinate pair with LONG x and y members, used for cursor positions, mouse events, and graphical primitives. For message processing, the MSG structure holds details of a queued message, including HWND hwnd (target window), UINT message (identifier), WPARAM wParam and LPARAM lParam (parameters), DWORD time (timestamp), and POINT pt (cursor position), facilitating event-driven programming in window procedures. Process creation relies on the STARTUPINFO structure (and its ANSI variant STARTUPINFOA), which includes members like DWORD cb (size), LPSTR lpDesktop (desktop assignment), DWORD dwFlags (options such as window visibility), and handles for standard input/output/error, allowing customization of a new process's initial environment. Version-specific adaptations address architectural changes, notably in pointer-sized types like SIZE_T, defined as typedef ULONG_PTR SIZE_T to represent the maximum addressable (32 bits on 32-bit Windows, 64 bits on 64-bit Windows since ). This evolution ensures scalability for allocation and array sizing in 64-bit applications, where exceeding 4 GB of is common, while maintaining through conditional compilation. These types and structures form the foundational building blocks for calls, as detailed in related sections on invocation mechanisms.

Error Handling and Debugging

The Windows API employs a combination of return codes, values, and exception mechanisms to manage failures and unexpected conditions during program execution. Win32 functions typically indicate through return values, often zero or NULL for failure, with detailed information stored in accessible via specific APIs. This approach allows developers to query and interpret programmatically, ensuring robust application behavior across diverse system states. Structured exception handling (SEH) complements these by providing a framework for intercepting and recovering from both faults and software-generated exceptions, enhancing reliability in multithreaded environments. Win32 error codes form the primary mechanism for reporting API failures, represented as 32-bit unsigned integers (DWORD) in the range 0 to 65,535, with values from 0 to 499 commonly used for system errors. The GetLastError function retrieves the most recent error code set by a failed Win32 API call on the calling thread, preserving per-thread isolation to avoid interference in multithreaded applications. To obtain a human-readable description, developers use FormatMessage, which formats the error code into a message string using system message tables, supporting flags like FORMAT_MESSAGE_FROM_SYSTEM for automatic buffer allocation and localization. For example, after a failed CreateFile call, an application might invoke GetLastError to get code 2 (ERROR_FILE_NOT_FOUND) and FormatMessage to retrieve "The system cannot find the file specified." Error codes in the Windows API also encompass HRESULT (a 32-bit value used in and many modern APIs) and NTSTATUS (a 32-bit code from the NT kernel layer). The HRESULT_FROM_WIN32 macro converts a Win32 to an HRESULT by combining the facility code (FACILITY_WIN32 = 0x7) with the error value in the pattern 0x80070000 + error, setting the severity bit for failure indication; for instance, Win32 error 5 () becomes HRESULT 0x80070005. Similarly, the RtlNtStatusToDosError function maps NTSTATUS values (e.g., STATUS_ACCESS_DENIED = 0xC0000022) to equivalent Win32 s like 5, facilitating between kernel-mode and user-mode components. These conversions ensure consistent error propagation across API layers without loss of semantic meaning. Structured exception handling (SEH) provides a low-level mechanism to catch and process exceptions, extending beyond simple error codes to handle asynchronous events like access violations or arithmetic overflows. Developers enclose potentially risky code in a __try block, followed by an __except block that executes if an exception matches the filter expression, allowing decisions to continue execution, terminate, or propagate the exception. The RaiseException function explicitly generates a software exception by specifying an exception code, flags, and parameters, enabling custom error signaling within SEH; for example, it can raise EXCEPTION_ACCESS_VIOLATION (0xC0000005) to trigger handler evaluation. SEH operates at the machine level, supporting vectored handlers for global interception and ensuring cleanup via __finally blocks, which is crucial for in Windows applications. Debugging APIs facilitate runtime inspection and logging without halting execution. The OutputDebugString function outputs a to any attached , generating an OUTPUT_DEBUG_STRING_EVENT for display in tools like DebugView, ideal for conditional logging during development. DebugBreak triggers a breakpoint exception (EXCEPTION_BREAKPOINT = 0x80000003), pausing the process and notifying the for immediate inspection. Complementing these, IsDebuggerPresent queries whether a user-mode is attached to the process, returning a nonzero value if true, allowing applications to adjust behavior such as suppressing debug output in release builds. These functions integrate seamlessly with the Windows debugging subsystem, supporting just-in-time debugging scenarios. For advanced debugging, Windows provides tool integration through symbol files and tracing facilities. Program database (PDB) files store symbol information, mapping machine code addresses to source lines, function names, and variables; WinDbg, a versatile kernel and user-mode debugger, loads these PDBs to resolve symbols during crash dump analysis or live sessions, enabling precise stack traces and variable inspection in Windows API applications. Event Tracing for Windows (ETW) offers high-performance, kernel-integrated tracing, where providers register events via APIs like EventWrite, and consumers enable sessions with StartTrace for real-time or logged capture; this is particularly useful for performance debugging and diagnosing API interactions without instrumentation overhead. ETW supports both user-mode and kernel-mode events, with tools like Windows Performance Analyzer processing traces for bottlenecks in API calls.

Multimedia and Graphics Extensions

The Windows API includes several extensions that enhance multimedia and graphics capabilities beyond the core functionality, enabling developers to handle advanced audio, video, and rendering tasks with hardware acceleration. These extensions, primarily part of the DirectX suite and related frameworks, provide low-level access to GPU resources for high-performance applications such as games, video players, and image processors. Introduced progressively since the late 1990s, they address limitations in legacy APIs by supporting modern hardware features like shader programming and efficient media pipelines. DirectX serves as a foundational extension for and , offering s for and audio processing. The , a key component in earlier DirectX versions, allows applications to create and manage rendering devices for , facilitating operations like processing and on the GPU. This enables direct control over rendering pipelines, improving performance for real-time applications compared to software-based rendering. For audio, DirectSound provides a mixing that handles multiple sound streams with low-latency buffering, supporting spatial audio and hardware-accelerated effects through interfaces like IDirectSoundBuffer. Although deprecated in favor of newer audio s, DirectSound remains available for legacy compatibility in Windows applications.) Media Foundation represents a modern extension for handling , introduced in as a successor to for more efficient video and audio processing. The IMFMediaSession interface manages playback sessions, coordinating topology building, state transitions, and event handling for protected and unprotected content, which simplifies streaming and decoding workflows. This framework supports hardware-accelerated decoding via DXVA integration and is recommended for applications due to its improved scalability over . The extends the API for image handling, providing a codec framework for encoding, decoding, and manipulating various formats without vendor-specific dependencies. The interface enables applications to query and extract frames from image files, supporting metadata access and pixel format conversion for formats like , , and . WIC integrates with other graphics APIs, allowing seamless image loading into rendering pipelines. Direct2D builds on these extensions by offering hardware-accelerated 2D graphics, introduced in to complement GDI with GPU support for , bitmaps, and text rendering. It uses for acceleration, providing interfaces like ID2D1Device for factory creation and , which enable high-quality anti-aliased drawing at interactive frame rates. This integration allows developers to layer 2D content over 3D scenes efficiently.

Security and Cryptography APIs

The Windows API provides a suite of functions and libraries for implementing and features, enabling developers to perform , , , and hardware-secured operations within applications. These APIs are essential for protecting , , and user identities in Win32-based software, supporting both legacy and modern cryptographic standards. Key components include the Cryptography API (CryptoAPI) for traditional operations and its successor, Cryptography API: Next Generation (CNG), which offers enhanced flexibility and extensibility for and algorithm implementation. CryptoAPI, introduced in early Windows versions, facilitates symmetric and asymmetric through functions like CryptAcquireContext, which obtains a handle to a cryptographic (CSP) and key container for subsequent operations. For , CryptEncrypt processes data using algorithms such as for symmetric or for asymmetric , allowing developers to secure communications and stored data by specifying parameters like key handles and buffer sizes. Although CryptoAPI remains available for , recommends transitioning to CNG, available since , which separates algorithm providers from key storage for better modularity and support for newer standards. CNG extends cryptographic capabilities with for hashing, signing, and key derivation, emphasizing of cryptographic operations from to enhance . For integration, NCryptOpenStorageProvider loads a key provider, such as the TPM-based provider, enabling persistent key in Trusted Platform Modules (TPMs) for secure boot and attestation processes. In , TPM 2.0 integration via CNG supports features like key protection and Windows Hello authentication, where hardware-bound keys prevent extraction and ensure tamper-resistant operations, aligning with 2025 enhancements for endpoint protection against firmware attacks. Access control in the Windows API relies on token-based mechanisms to manage privileges and . The AdjustTokenPrivileges function enables or disables existing privileges in an without adding new ones, allowing applications to elevate capabilities like backup operations or shutdown for the current process or impersonated . Complementing this, GetTokenInformation retrieves details about a , such as privilege assignments or group memberships, via classes like TokenPrivileges, aiding in auditing and decisions. These functions are integral to implementing least-privilege principles in Win32 applications. For claims-based authentication and federation, Windows Identity Foundation (WIF), integrated into the .NET Framework since version 4.5, provides tools to handle security tokens and identity delegation in scenarios involving and protocols. WIF enables applications to process claims from identity providers, supporting token issuance and validation for across trusted realms, though modern implementations often leverage the Authentication Library (MSAL) for acquiring tokens via methods like AcquireTokenAsync in integrated environments. This framework ensures secure identity propagation in enterprise applications built on Windows platforms.

Modern Windows APIs (WinRT and Beyond)

The (WinRT) introduced a component-oriented that emphasizes metadata-driven discovery, asynchronous operations, and cross-language compatibility, serving as the foundation for modern Windows application development. Central to WinRT is the , from which all WinRT interfaces derive, extending IUnknown to provide runtime introspection via methods such as GetRuntimeClassName for type identification and GetTrustLevel for contract versioning, enabling dynamic querying and activation without prior knowledge of types. This structure supports language projections that abstract underlying COM-based mechanics; for instance, C++/WinRT delivers a library for direct WinRT consumption, while C#/WinRT generates .NET interop assemblies that map WinRT types to familiar , handling and interface queries transparently. Building on WinRT, the Universal Windows Platform (UWP) APIs enable the creation of distributed, touch-first applications through a restricted execution environment that promotes and . The Windows.UI.Xaml namespace facilitates declarative UI development using XAML, a for defining hierarchical elements like controls, layouts, and data bindings, which compile to efficient runtime representations for cross-device rendering. UWP's app lifecycle management governs execution states—including NotRunning (pre-launch or post-termination), Running (foreground or background), Suspended (paused with preserved ), and Terminated (system-closed for resources)—via key events such as OnLaunched for initial activation and state restoration, Suspending for asynchronous state persistence using deferrals, and Resuming for UI refresh, ensuring seamless user experiences across suspension and reactivation. The further modernizes desktop development by providing a unified toolkit for Win32 applications, allowing traditional codebases to adopt packaged deployment via MSIX while integrating contemporary features without full UWP migration. It bridges legacy Win32 APIs with WinRT components through consistent access to services like WinUI 3 for native, Fluent Design-compliant interfaces, MRT Core for resource localization, and advanced windowing, all deployable in both packaged (Store-distributed, sandboxed) and unpackaged modes to maintain compatibility across Windows 10 (version 1809+) and Windows 11. As of 2025, enhancements to and APIs, particularly Windows ML, have expanded on-device inference support by leveraging ONNX Runtime for hardware-accelerated execution of models on CPUs, GPUs, and neural processing units, enabling low-latency, privacy-preserving scenarios like real-time image analysis without cloud dependency. Windows ML became generally available in September 2025, enabling production deployment of on-device models. Integrated into the , these APIs now include the Microsoft.Windows..MachineLearning namespace for streamlined model loading and evaluation, superseding earlier implementations and aligning with Windows AI Foundry's local features for PCs.

Historical Development

Origins and Early Evolution

The Windows API originated from the application programming interfaces provided by , where programs accessed operating system services primarily through software interrupts, such as INT 21h, which acted as the central dispatcher for functions like file input/output, memory allocation, and process execution. This interrupt-driven approach, implemented in the kernel ( and IO.SYS/MSDOS.SYS), emphasized simplicity and direct hardware access on x86 processors, influencing the Windows API's early design by establishing a model of modular, callable system services that could be extended for more complex environments. With the release of in November 1985, introduced the foundational components of what would evolve into the modern Windows API, focusing on (GUI) capabilities while maintaining compatibility with . The system comprised three core modules: for low-level services including , task switching, and file I/O; for window management, message handling, and user input; and GDI for functions such as drawing primitives and font rendering. These 16-bit components ran cooperatively atop without protected memory, relying on conventions rather than hardware-enforced separation to prevent crashes, and directly built upon DOS interrupt calls for underlying operations. and GDI would later form the basis for user32.dll and gdi32.dll in 32-bit Windows implementations. The transition to more advanced multitasking in (1990) and (1992) expanded the 16-bit with improved memory management via the GlobalAlloc functions and enhanced multitasking through the Windows 's cooperative model, still layered over . To bridge toward amid growing demand for protected-mode applications, Microsoft released in 1993 as a extension for , providing a subset of the emerging Win32 that enabled select 32-bit executables to run in a protected 32-bit while thunking unsupported calls (e.g., advanced networking or threading) to the underlying 16-bit system. supported key Win32 features like flat memory addressing and the core user32 and gdi32 interfaces but omitted full services, serving as a transitional layer that accelerated developer adoption of 32-bit code without requiring a full OS . The release of in August 1995 marked a major milestone, introducing the full Win32 API to the consumer market on a MS-DOS-based operating system. It provided preemptive multitasking for 32-bit applications, support, and the first version of the (Explorer) via APIs in shell32.dll, significantly boosting Win32 adoption among developers and users. (1998) and (2000) further refined these APIs with USB support and media enhancements, though retaining the hybrid 16/32-bit architecture. In parallel, the inception of in July 1993 marked a pivotal evolution on the enterprise side, introducing a secure, portable 32-bit API implementation decoupled from dependencies under the leadership of engineer Dave Cutler, who drew from his prior work on Digital Equipment Corporation's operating system. The NT kernel adopted a microkernel-inspired with hardware-enforced protection rings (ring 0 for kernel, ring 3 for user-mode APIs), enabling the full Win32 API—including comprehensive user32 for windowing, gdi32 for graphics, and kernel32 for process/thread management—to operate in isolated address spaces for enhanced stability and security. This design prioritized portability across CPU architectures (initially x86, MIPS, Alpha, and PowerPC) and incorporated C2-level security features like access control lists, establishing the Win32 API as a robust, enterprise-ready interface that would underpin subsequent Windows versions. Windows 2000, released in February 2000 as NT 5.0, unified the consumer and enterprise branches by stabilizing the Win32 API across both lines, introducing features like for network management via new security and directory service APIs, improved plug-and-play support, and enhanced stability, paving the way for broader API consistency.

Key Milestones and Changes

The Windows API saw pivotal advancements starting with in 2001, which integrated the .NET Framework 1.0 and its (CLR) for managed code development, enabling safer and more efficient applications through and garbage collection. This integration allowed developers to leverage CLR-hosted APIs for cross-language interoperability while maintaining compatibility with native Win32 code. Additionally, introduced version 6 of the Common Controls library (Comctl32.dll v6), supporting themed user interfaces with visual styles that applied theme aesthetics to buttons, menus, and other elements, requiring an application manifest to opt in for these enhancements. These changes marked a shift toward richer, customizable UIs without altering core Win32 structures. Windows Vista, released in 2007, emphasized security and composition with the debut of (UAC) and the () . UAC fundamentally altered privilege management by prompting for elevation on administrative tasks, filtering the for standard users to mitigate risks while preserving through manifest declarations. The revolutionized desktop rendering by offloading window composition to hardware-accelerated surfaces, enabling visual effects such as translucent glass frames, live thumbnails, and Flip3D transitions for a more fluid, layered experience. Developers could interact with via functions like DwmEnableComposition to toggle effects, influencing calls for window management and graphics. In 2012, introduced the (WinRT) API, a metadata-driven platform designed for Metro-style (later UWP) applications optimized for touch interactions on diverse devices. WinRT abstracted underlying Win32 components into a projection model supporting languages like C++, C#, and , with built-in asynchronous patterns via IAsyncInfo interfaces to handle touch gestures, sensors, and contracts for sharing and search. This layered API extended the Windows ecosystem beyond traditional desktop apps, enforcing sandboxing and lifecycle management for immersive experiences while allowing interop with classic Win32 via activation. Windows 10, launched in 2015, and its successor evolved the API toward adaptive, motion-rich interfaces with the , incorporating depth via acrylic materials, parallax effects, and reveal highlights through updated XAML and WinUI controls. APIs like those in WinUI 3 enabled connected animations and variable timing (e.g., 167ms for gentle eases) to create responsive UIs across form factors. In , Snap Layouts API enhancements allowed programmatic support for multitasking zones, invoked via Win+Z or mouse hover, with minimum width constraints (500 epx) to ensure compatibility on varied screens. By 2025, Windows 11's Copilot+ integrations expanded the API with on-device AI capabilities powered by Neural Processing Units (NPUs), introducing Windows AI APIs for local inference without cloud dependency. Key additions include the Phi Silica small for text generation and summarization, alongside imaging APIs for object erasure and super-resolution, accessible through WinRT projections in apps targeting Copilot+ PCs. These APIs prioritize via edge processing, with samples demonstrating integration for features like real-time conversation tone adjustment, building on prior evolutions for intelligent, hardware-accelerated experiences.

Versions and Implementations

Major Version History

The Windows API employs macros such as _WIN32_WINNT and WINVER to specify the operating , enabling conditional of APIs based on availability across Windows releases. These macros define the minimum supported Windows , influencing which functions, constants, and structures are exposed in header files like sdkddkver.h. For instance, setting _WIN32_WINNT to 0x0500 targets , while 0x0A00 encompasses and later, including Windows 11. The following table outlines key _WIN32_WINNT values for major Windows versions:
Windows Version_WIN32_WINNT ValueNTDDI Value (Example)
0x0400N/A
0x05000x05000000
0x05010x05010000
0x05020x05020000
Windows Vista/Server 20080x06000x06000000
0x06010x06010000
0x06020x06020000
0x06030x06030000
Windows 10/110x0A000x0A000000
Early major versions introduced foundational shell functionalities; for example, added APIs like ShellExecute for launching documents and applications within the shell , marking a shift toward integrated operations. Subsequent releases built on this with user interface enhancements, such as the TaskDialog API in , which provides customizable dialogs with command links, radio buttons, and verification checkboxes to replace basic MessageBox calls, improving in modern applications. More recent versions emphasize visual and architectural advancements; introduced APIs for Mica and Acrylic backdrop materials via the , allowing developers to apply dynamic, theme-aware translucent effects to backgrounds for enhanced aesthetics and depth in applications. These effects leverage DwmSetWindowAttribute for and opacity control, supporting both and modes. To manage conflicts in DLL dependencies, Windows uses application manifests for side-by-side () assemblies, which isolate components like common controls or runtime libraries, ensuring applications load the intended API versions without system-wide interference. As of 2025, version 24H2 enhances ARM64 native support through improved emulator integration like for x86/x64 apps and expanded WDK tools for ARM64 driver development, enabling broader utilization on Arm-based without emulation overhead for native code. This update facilitates hotpatching for ARM64 devices, reducing restart needs for security and feature updates while maintaining Win32 compatibility.

Compatibility and Portability

The Windows API maintains across evolving of the operating through a combination of compile-time directives, , and mechanisms, ensuring that applications can target specific features while remaining functional on supported platforms. These strategies address challenges in binary , hardware architecture transitions, and the integration of legacy code with modern environments, allowing developers to build portable applications within the ecosystem. Version targeting is achieved via preprocessor macros such as _WIN32_WINNT, which developers define to specify the minimum Windows version for conditional compilation. For instance, setting #define _WIN32_WINNT 0x0A00 enables code paths for and later, while excluding APIs unavailable in older versions like (0x0601). This macro, along with WINVER, is typically set in headers like targetver.h before including Windows SDK files, allowing the compiler to resolve declarations and avoid errors from unsupported functions. By aligning with SDK version constants in sdkddkver.h, such as NTDDI_WIN10, developers ensure forward-compatible builds that adapt to the target OS without runtime failures. Emulation layers further enhance portability by bridging architectural differences and app models. The WOW64 subsystem emulates a 32-bit x86 environment on 64-bit Windows (x64 and ARM64), intercepting system calls from 32-bit processes via thunks in wow64.dll and redirecting them to the native 64-bit kernel. This allows legacy 32-bit Win32 applications to run seamlessly alongside 64-bit ones, with isolated address spaces and environment variables (e.g., PROCESSOR_ARCHITECTURE=x86 for 32-bit views) to prevent conflicts in file paths or registry access. Similarly, the Desktop Bridge (now integrated into MSIX packaging) enables Win32 applications to be containerized and run within the Universal Windows Platform (UWP) on and later, providing access to modern APIs like notifications and app services while preserving existing code. Developers package Win32 binaries into a UWP app using tools like the Desktop App Converter, ensuring compatibility with distribution and cross-device deployment without full rewrites. API sets provide a virtualization layer for forward compatibility, using schema-defined contracts like api-ms-win-core-* to abstract underlying DLL implementations. These virtualized modules, such as api-ms-win-core-processenvironment-l1-2-0.dll, act as lightweight forwarders resolved by the OS loader at , redirecting calls to the appropriate binaries (e.g., kernel32.dll) based on the device's . Introduced in , this mechanism supports device portability across PCs, servers, and embedded systems by decoupling application binaries from specific OS versions, enabling older apps to leverage new features without recompilation. Direct forwarding offers efficient one-step resolution, while reverse forwarding maps legacy DLL requests to API sets, maintaining . Portability challenges arise from deprecated functions, such as GetVersionEx, which was altered in to return version 6.2 () unless the app explicitly targets 8.1 or later, potentially causing version-check failures in legacy code. To mitigate this, recommends Version Helper APIs in VersionHelpers.h, like IsWindows8Point1OrGreater(), which accurately detect the running OS without dependencies. For broader legacy support, application compatibility shims—small interceptors created via the Compatibility Administrator tool—modify API behaviors at , emulating older Windows environments for specific apps (e.g., adjusting management or version reporting). These shims, applied per , transform calls to align with new OS semantics, ensuring that unmaintained software runs without crashes on modern .

Third-Party and Cross-Platform Implementations

Third-party implementations of the Windows API enable with Windows software on non-Microsoft platforms, often through reimplementation, layers, or techniques. These efforts address the challenge of running Windows applications and drivers on alternative operating systems or development environments, fostering open-source alternatives and cross-platform development without relying on official binaries. The Wine project is an open-source designed to run Windows applications on POSIX-compliant operating systems such as , macOS, and BSD. It translates Windows API calls into equivalent POSIX calls, supporting a wide range of Win32 APIs through ongoing development. As of 2025, Wine 10.0 and subsequent releases, including Wine 10.18, have introduced enhancements like Vulkan-based mapping, improved WinRT exception handling, and better support for 16-bit applications and components, enabling execution of many Windows programs without emulation overhead. ReactOS is an open-source operating system that reimplements the kernel and associated APIs to achieve binary compatibility with Windows software and drivers. This allows unmodified Windows applications from earlier eras, such as those targeting , to run natively on hardware. In 2025, the release of version 0.4.15 brought significant kernel improvements, including better support, , and initial explorations into (WDDM) compatibility for modern graphics, advancing its goal of serving as a trustworthy open-source alternative. Cygwin and MinGW provide bridges for Unix-like development on Windows by mapping POSIX interfaces to Windows API calls, facilitating the porting and building of software across environments. Cygwin offers a comprehensive POSIX compatibility layer via the cygwin1.dll library, which intercepts POSIX system calls and redirects them to native Win32 equivalents, enabling a shell and tools on Windows for tasks like file handling and process management. MinGW, particularly the MinGW-w64 variant, complements this by supplying GCC-based toolchains with Windows API headers, allowing developers to compile native Windows executables using POSIX-style build systems without a full layer, thus supporting hybrid workflows. Commercial solutions like address compatibility gaps through , packaging Windows applications into portable executables that isolate API dependencies from the host OS. This enables deployment across different Windows versions or thin-client infrastructures, mitigating issues in legacy software migration and cross-device portability, such as to virtual desktops or endpoint management systems.

Language and Compiler Support

The Windows API is natively supported in and through the windows.h header file, which declares functions, structures, and constants essential for interacting with the operating system. Visual C++ (MSVC), the official compiler from , provides seamless integration with this header, enabling developers to build traditional Win32 applications directly. For example, including #include <windows.h> allows access to core functions like CreateWindow for GUI creation. This setup has been the standard since the API's inception, ensuring high performance and direct system access without intermediaries. For developers preferring open-source tools, offers compatibility with the by supplying Windows-specific headers and libraries that mirror the Win32 API. This allows cross-compilation of C/C++ code targeting Windows from non-Microsoft environments, supporting both 32-bit and 64-bit architectures while maintaining binary compatibility with MSVC outputs. is particularly useful for projects requiring GCC's optimizations or integration with build systems on Windows. In managed environments, C# leverages Platform Invoke (P/Invoke) for with the Windows API from .NET applications. By using the [DllImport] attribute, developers can declare and call unmanaged DLL functions, such as those in kernel32.dll, directly from managed code, with .NET handling marshaling of data types like strings and pointers. This mechanism is documented extensively for ensuring and error handling during interop. Similarly, Java applications access the API via Java Native Access (JNA), a library that maps native functions to interfaces without requiring custom JNI wrappers, simplifying calls to libraries like user32.dll for window management. Scripting support includes VBScript and JScript, executed through the Windows Script Host (WSH) via the wscript.exe host, which exposes Windows API objects like WScript.Shell for tasks such as file operations and process launching. However, VBScript has been deprecated since May 2023, with its DLLs scheduled for removal in future Windows releases, prompting migration to alternatives. PowerShell, built on .NET, extends this by providing hundreds of cmdlets that internally wrap Windows API calls using P/Invoke; for instance, the Get-Process cmdlet invokes functions from psapi.dll like EnumProcesses to enumerate running processes, offering a high-level, scriptable interface to low-level system details. As of 2025, has emerged as a modern option with the windows from , which generates safe, idiomatic bindings to the entire Windows API using metadata-driven . This supports calling past, present, and future APIs with guarantees, addressing gaps in non-C++ coverage by enabling developers to build secure Windows applications and even drivers. Updates in 2025 have focused on enhancing driver support and integration with the Windows SDK, reflecting 's growing adoption for on Windows.

References

  1. [1]
    API Index - Win32 apps - Microsoft Learn
    Apr 28, 2021 · The Windows application programming interface (API) lets you develop desktop and server applications that run successfully on all versions ...
  2. [2]
    Windows API index - Win32 apps - Microsoft Learn
    Mar 15, 2023 · The Windows UI API creates and uses windows to display output, prompt for user input, and carry out the other tasks that support interaction ...API Index · Windows Accessibility... · Windows Shell · API sets
  3. [3]
    Programming reference for the Win32 API - Microsoft Learn
    This section provides the Win32 API reference documentation organized by technology areas and header.Windows Controls · The Windows Shell · Windows GDI · Windows Multimedia
  4. [4]
    Windows API sets - Win32 apps - Microsoft Learn
    May 31, 2023 · Win32 APIs are organized into functional groups called API sets. The purpose of an API set is to provide an architectural separation from the host DLL.
  5. [5]
    Get started with desktop Windows apps that use the Win32 API
    Nov 27, 2024 · The Win32 API is the name given to the original platform for native C/C++ Windows applications that require direct access to Windows and ...
  6. [6]
    Identifying Functions in DLLs - .NET Framework - Microsoft Learn
    Mar 11, 2022 · The identity of a DLL function consists of the following elements: For example, specifying the MessageBox function in the User32.dll identifies the function.
  7. [7]
    Build desktop Windows apps using the Win32 API - Microsoft Learn
    Learn to build desktop Windows apps using C++ and the Win32 API. Resources include a Windows API index and programming reference.Windows API index · Programming reference for the... · Get started with desktop...
  8. [8]
    User Mode and Kernel Mode - Windows drivers - Microsoft Learn
    Oct 28, 2025 · Applications operate in user mode. Core operating system components function in kernel mode. Although many drivers operate in kernel mode, some ...Missing: NT | Show results with:NT
  9. [9]
    Overview of Windows Components - Windows drivers | Microsoft Learn
    Feb 21, 2025 · The Windows operating system includes both user-mode and kernel-mode components. For more information about Windows user and kernel modes, see User Mode and ...Missing: NT | Show results with:NT
  10. [10]
    Inside Native Applications - Sysinternals - Microsoft Learn
    Mar 23, 2021 · The NTDLL runtime consists of hundreds of functions that allow native applications to perform file I/O, interact with device drivers, and ...
  11. [11]
    .NET Column: Calling Win32 DLLs in C# with P/Invoke | Microsoft ...
    In this column I am going to focus on the practical use of P/Invoke for calling Windows API functions. P/Invoke is used as a noun when referring to the COM ...
  12. [12]
    How RPC Works - Win32 apps | Microsoft Learn
    Aug 23, 2019 · The RPC tools make it appear to users as though a client directly calls a procedure located in a remote server program.
  13. [13]
    LPC and RPC Handles - Microsoft Learn
    May 31, 2018 · In this article · Handles created using local procedure calls (LPC handles). · Handles created using remote procedure calls (RPC handles).
  14. [14]
    COM Technical Overview - Win32 apps - Microsoft Learn
    Jan 6, 2021 · The Microsoft Component Object Model (COM) defines a binary interoperability standard for creating reusable software libraries that interact at run time.
  15. [15]
    Processes and Threads - Win32 apps | Microsoft Learn
    Jul 14, 2025 · A thread is the basic unit to which the operating system allocates processor time. A thread can execute any part of the process code, including ...
  16. [16]
    CreateProcessA function (processthreadsapi.h) - Win32 apps
    Feb 9, 2023 · Creates a new process and its primary thread. The new process runs in the security context of the calling process. (ANSI)
  17. [17]
    GetCurrentProcessId function (processthreadsapi.h) - Win32 apps
    Feb 22, 2024 · Retrieves the process identifier of the calling process. Syntax. DWORD GetCurrentProcessId();. Return value. The return value is the process ...
  18. [18]
    CreateThread function (processthreadsapi.h) - Win32 apps
    Jul 31, 2023 · Creates a thread to execute within the virtual address space of the calling process. To create a thread that runs in the virtual address space of another ...
  19. [19]
    About Processes and Threads - Win32 apps | Microsoft Learn
    Jul 14, 2025 · A thread is the entity within a process that can be scheduled for execution. All threads of a process share its virtual address space and system resources.
  20. [20]
    HeapAlloc function (heapapi.h) - Win32 apps | Microsoft Learn
    Feb 2, 2024 · HeapAlloc allocates a block of memory from a heap, which is not movable. The allocated memory is at least the requested amount.
  21. [21]
    VirtualAlloc function (memoryapi.h) - Win32 apps - Microsoft Learn
    Feb 5, 2024 · Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process. (VirtualAlloc)Memory Protection Constants · VirtualAllocEx · VirtualFree functionMissing: HeapAlloc | Show results with:HeapAlloc
  22. [22]
    Memory Protection Constants (WinNT.h) - Win32 apps
    May 20, 2022 · PAGE_EXECUTE_READWRITE; 0x40. Enables execute, read-only, or read/write access to the committed region of pages. Windows Server 2003 and Windows ...
  23. [23]
    Comparing Memory Allocation Methods - Win32 apps | Microsoft Learn
    Apr 7, 2022 · The VirtualAlloc function allows you to specify additional options for memory allocation. However, its allocations use a page granularity ...
  24. [24]
    CreateFileA function (fileapi.h) - Win32 apps | Microsoft Learn
    Feb 9, 2023 · Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, ...Syntax · Parameters · Remarks
  25. [25]
    ReadFile function (fileapi.h) - Win32 apps - Microsoft Learn
    Jul 22, 2025 · Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.Parameters · Remarks · Synchronization And File...
  26. [26]
    WriteFile function (fileapi.h) - Win32 apps - Microsoft Learn
    Mar 3, 2025 · Writes data to the specified file or input/output (I/O) device. This function is designed for both synchronous and asynchronous operation.Parameters · Remarks · Synchronization And File...
  27. [27]
    Synchronous and Asynchronous I/O - Win32 apps | Microsoft Learn
    Jul 8, 2025 · There are two types of input/output (I/O) synchronization: synchronous I/O and asynchronous I/O. Asynchronous I/O is also referred to as overlapped I/O.
  28. [28]
    GetStdHandle function - Windows Console - Microsoft Learn
    Dec 30, 2021 · Retrieves a handle to the specified standard device (standard input, standard output, or standard error).Missing: environment SetEnvironmentVariable
  29. [29]
    SetEnvironmentVariable function (winbase.h) - Win32 apps
    Sep 23, 2022 · The SetEnvironmentVariable function (winbase.h) sets the contents of the specified environment variable for the current process.Missing: console services GetStdHandle
  30. [30]
    Process Creation Flags (WinBase.h) - Win32 apps | Microsoft Learn
    Jul 14, 2025 · The following process creation flags are used by the CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, and CreateProcessWithTokenW functions.Missing: documentation | Show results with:documentation
  31. [31]
  32. [32]
  33. [33]
  34. [34]
    RegQueryValueExA function (winreg.h) - Win32 apps - Microsoft Learn
    Mar 11, 2023 · The RegQueryValueExA function retrieves the type and data for a specified value name associated with an open registry key.
  35. [35]
    SetThreadPriority function (processthreadsapi.h) - Win32 apps
    Sep 23, 2022 · The SetThreadPriority function enables setting the base priority level of a thread relative to the priority class of its process. For example, ...
  36. [36]
    GetSystemPowerStatus function (winbase.h) - Win32 apps
    Oct 13, 2021 · Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging.
  37. [37]
    SYSTEM_POWER_STATUS (winbase.h) - Win32 - Microsoft Learn
    Feb 22, 2024 · The percentage of full battery charge remaining. This member can be a value in the range 0 to 100, or 255 if status is unknown. SystemStatusFlag.
  38. [38]
    GetLocalTime function (sysinfoapi.h) - Win32 apps - Microsoft Learn
    Feb 22, 2024 · Retrieves the current local date and time. To retrieve the current date and time in Coordinated Universal Time (UTC) format, use the GetSystemTime function.
  39. [39]
    SetTimeZoneInformation function (timezoneapi.h) - Win32 apps
    Oct 12, 2021 · Sets the current time zone settings. These settings control translations from Coordinated Universal Time (UTC) to local time.
  40. [40]
    Unicode in the Windows API - Win32 apps - Microsoft Learn
    Jan 7, 2021 · The following topics discuss Unicode data types and how they are used in functions and messages; the use of resources, file names, and command line arguments.Missing: evolution | Show results with:evolution
  41. [41]
    MSLU: Develop Unicode Applications for Windows 9x Platforms with ...
    Oct 24, 2019 · The Microsoft Layer for Unicode (MSLU) provides Unicode support on Windows platforms that don't provide their own support, including Windows 98, Windows 95, ...
  42. [42]
    Windows GDI - Win32 apps | Microsoft Learn
    Jan 28, 2023 · The Microsoft Windows graphics device interface (GDI) enables applications to use graphics and formatted text on both the video display and the printer.
  43. [43]
    About Device Contexts - Win32 apps
    ### Summary of Device Contexts in GDI
  44. [44]
    ReleaseDC function (winuser.h) - Win32 apps - Microsoft Learn
    Oct 13, 2021 · The ReleaseDC function releases a device context (DC), freeing it for use by other applications. The effect of the ReleaseDC function depends on the type of DC.Missing: GDI | Show results with:GDI
  45. [45]
    TextOutA function (wingdi.h) - Win32 apps | Microsoft Learn
    Feb 9, 2023 · The TextOut function writes a character string at the specified location, using the currently selected font, background color, and text color.
  46. [46]
    Windows with C++: Layered Windows with Direct2D | Microsoft Learn
    Now if you can avoid the GDI DC entirely and just use a WIC bitmap directly, you can achieve the best possible performance without hardware acceleration. To ...
  47. [47]
    Improving the performance of Direct2D apps - Win32 - Microsoft Learn
    Oct 11, 2020 · Therefore, to increase performance, limit the number of rendering switches between Direct2D and Direct3D. ... Avoid drawing a GDI Meta File.Missing: limitations | Show results with:limitations
  48. [48]
    About Window Classes - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Registering a window class associates a window procedure, class styles, and other class attributes with a class name. When a process specifies a ...
  49. [49]
    CreateWindowExW function (winuser.h) - Win32 apps
    ### Summary of CreateWindowExW Function
  50. [50]
    Window Styles (Winuser.h) - Win32 apps - Microsoft Learn
    Jul 14, 2025 · The window is an overlapped window. Same as the WS_OVERLAPPEDWINDOW style. The window is initially visible. This style can be turned on and off ...Missing: classes | Show results with:classes
  51. [51]
    ShowWindow function (winuser.h) - Win32 apps | Microsoft Learn
    Jun 6, 2023 · Activates and displays a window. If the window is minimized, maximized, or arranged, the system restores it to its original size and position.Syntax · Parameters
  52. [52]
    Using Messages and Message Queues - Win32 apps | Microsoft Learn
    Jul 14, 2025 · You create a message loop by using the GetMessage and DispatchMessage functions. If your application must obtain character input from the user, ...
  53. [53]
    GetAsyncKeyState function (winuser.h) - Win32 apps
    ### Description of GetAsyncKeyState for Keyboard Input Handling
  54. [54]
    SetCursorPos function (winuser.h) - Win32 apps
    ### Summary of SetCursorPos for Mouse Input
  55. [55]
    OpenClipboard function (winuser.h) - Win32 apps
    ### Summary of OpenClipboard for Clipboard Handling
  56. [56]
    None
    Nothing is retrieved...<|separator|>
  57. [57]
    LoadMenuW function (winuser.h) - Win32 apps
    ### Summary of LoadMenuW Function
  58. [58]
    InitCommonControlsEx function (commctrl.h) - Win32 - Microsoft Learn
    Feb 22, 2024 · Ensures that the common control DLL (Comctl32.dll) is loaded, and registers specific common control classes from the DLL.
  59. [59]
    Creating Common Controls - Win32 apps - Microsoft Learn
    Nov 4, 2020 · To ensure that the common control DLL is loaded, include the InitCommonControlsEx function in your application.
  60. [60]
    About Tree-View Controls - Win32 apps - Microsoft Learn
    Jul 31, 2025 · A tree-view control sends the parent window a TVN_ITEMEXPANDING notification message when a parent item's list of child items is about to be ...
  61. [61]
    TVITEMA (commctrl.h) - Win32 apps - Microsoft Learn
    Jul 26, 2022 · Specifies or receives attributes of a tree-view item. This structure is identical to the TV_ITEM structure, but it has been renamed to follow current naming ...
  62. [62]
    About List-View Controls - Win32 apps - Microsoft Learn
    Nov 18, 2022 · A list-view control is a window that displays a collection of items. List-view controls provide several ways to arrange and display items and are much more ...List-View Styles and Views · Virtual List-View Style
  63. [63]
    How to Create a List-View Control - Win32 apps | Microsoft Learn
    Nov 4, 2020 · To create a list-view control, you use the CreateWindow or CreateWindowEx function and specify the WC_LISTVIEW window class.
  64. [64]
    About Dialog Boxes - Win32 apps | Microsoft Learn
    Aug 19, 2020 · DialogBox creates a modal dialog box; CreateDialog creates a modeless dialog box. These two functions load a dialog box template from the ...Missing: API | Show results with:API
  65. [65]
    Using Dialog Boxes - Win32 apps | Microsoft Learn
    Aug 19, 2020 · You create a modeless dialog box by using the CreateDialog function, specifying the identifier or name of a dialog box template resource and a ...
  66. [66]
    About Property Sheets - Win32 apps | Microsoft Learn
    Mar 18, 2021 · A property sheet is a window that allows the user to view and edit the properties of an item. For example, a spreadsheet application can use a property sheet.
  67. [67]
    CreatePropertySheetPageA function (prsht.h) - Win32 apps
    Feb 22, 2024 · An application uses the PropertySheet function to create a property sheet that includes the new page. If you are not using the Aero wizard ...
  68. [68]
    How to Create Wizards - Win32 apps | Microsoft Learn
    Mar 18, 2021 · When you call CreatePropertySheetPage to create a page, assign the result to an element of an array of HPROPSHEETPAGE handles. This array is ...Missing: API | Show results with:API
  69. [69]
    Enabling Visual Styles - Win32 apps - Microsoft Learn
    Jun 29, 2021 · This topic explains how to configure your application to ensure that common controls are displayed in the user's preferred visual style.Using Comctl32. Dll Version... · Using Comctl32 Version 6 In... · Adding Visual Style Support...
  70. [70]
    Visual Styles - Win32 apps | Microsoft Learn
    Aug 23, 2019 · Visual styles changes the appearance of common controls based on the theme chosen by the user. Prior to Windows 8, you must specifically configure your ...
  71. [71]
    Visual Styles Overview - Win32 apps - Microsoft Learn
    Nov 4, 2020 · A visual style is a specification that defines the appearance of the Windows common controls. Visual styles are associated with themes.
  72. [72]
    Getting Information About the Contents of a Folder - Win32 apps
    Jan 7, 2021 · The IShellFolder interface provides a number of useful methods, two of which are discussed here. Other IShellFolder methods and other Shell ...Missing: API | Show results with:API
  73. [73]
    IShellFolder (shobjidl_core.h) - Win32 apps - Microsoft Learn
    Jul 21, 2021 · Use this interface when you need to display or perform an operation on the contents of the Shell's namespace. Objects that support IShellFolder ...
  74. [74]
    SHGetDesktopFolder function (shlobj_core.h) - Win32 apps
    Feb 22, 2024 · Retrieves the IShellFolder interface for the desktop folder, which is the root of the Shell's namespace.
  75. [75]
    Shell_NotifyIconA function (shellapi.h) - Win32 apps | Microsoft Learn
    Feb 8, 2023 · It can define an icon to add to the notification area, cause that icon to display a notification, or identify an icon to modify or delete.Syntax · Parameters
  76. [76]
    Notifications and the Notification Area - Win32 apps | Microsoft Learn
    Oct 10, 2022 · Shell_NotifyIcon allows you to add, modify, or delete an icon in the notification area. notification area containing three icons. When an icon ...Creating And Displaying A... · Add A Notification Icon · Define The Notifyicondata...
  77. [77]
    Shell_NotifyIconGetRect function (shellapi.h) - Win32 - Microsoft Learn
    The Shell_NotifyIconGetRect function gets the screen coordinates of a notification icon's bounding rectangle, using a pointer to a RECT structure.
  78. [78]
    ShellExecuteA function (shellapi.h) - Win32 apps | Microsoft Learn
    Feb 9, 2023 · The ShellExecuteA function performs an operation on a specified file, using a verb to specify the action to be performed.
  79. [79]
    Launching Applications (ShellExecute, ShellExecuteEx ...
    Jul 2, 2025 · To use ShellExecute or ShellExecuteEx, your application must specify the file or folder object that is to be acted on, and a verb that specifies the operation.Using ShellExecute and... · Object Verbs
  80. [80]
    Transferring Shell Objects with Drag-and-Drop and the Clipboard
    Jan 7, 2021 · This document discusses how applications can implement drag-and-drop and Clipboard data transfers with Shell objects.
  81. [81]
    IVirtualDesktopManager interface (shobjidl_core.h) - Microsoft Learn
    Feb 22, 2024 · The user can group a collection of windows together to create a virtual desktop. Every window is considered to be part of a virtual desktop.
  82. [82]
    IVirtualDesktopManager::MoveWindowToDesktop (shobjidl_core.h)
    Feb 22, 2024 · Moves a window to the specified virtual desktop.
  83. [83]
    Windows Sockets 2 - Win32 apps - Microsoft Learn
    Jan 7, 2021 · Windows Sockets 2 (Winsock) enables programmers to create advanced Internet, intranet, and other network-capable applications to transmit application data ...
  84. [84]
    Getting started with Winsock - Win32 apps - Microsoft Learn
    Feb 9, 2023 · This section is a step-by-step guide to getting started with Windows Sockets programming. It's designed to provide an understanding of basic Winsock functions ...Creating a Basic Winsock... · About Servers and Clients
  85. [85]
    socket function (winsock2.h) - Win32 apps | Microsoft Learn
    Oct 13, 2021 · The socket function causes a socket descriptor and any related resources to be allocated and bound to a specific transport-service provider.
  86. [86]
    GetAdaptersInfo function (iphlpapi.h) - Win32 apps | Microsoft Learn
    Oct 13, 2021 · The GetAdaptersInfo function retrieves adapter information for the local computer. On Windows XP and later, use the GetAdaptersAddresses function instead of ...
  87. [87]
    Managing Network Adapters Using GetAdaptersInfo - Win32 apps
    Jan 7, 2021 · The GetAdaptersInfo function fills a pointer to an IP_ADAPTER_INFO structure with information about the network adapters associated with the system.Missing: docs | Show results with:docs
  88. [88]
    RpcBindingCreateA function (rpcdce.h) - Win32 apps | Microsoft Learn
    Feb 8, 2023 · The RpcBindingCreate function creates a new fast RPC binding handle based on a supplied template. (ANSI)
  89. [89]
    Remote procedure call (RPC) - Win32 apps | Microsoft Learn
    Feb 7, 2022 · Microsoft Remote Procedure Call (RPC) defines a powerful technology for creating distributed client/server programs.Missing: architecture | Show results with:architecture
  90. [90]
    IPv6 Support - Win32 apps - Microsoft Learn
    Jan 7, 2021 · An application that wants to perform name resolution and address conversion for IPv6 addresses must use Windows Sockets 2-specific functions.
  91. [91]
    IPv6 Guide for Windows Sockets Applications - Win32 apps
    May 5, 2025 · This guide provides the information you need to enable your Microsoft Windows application to use the next generation of Internet Protocol, version 6 (IPv6).
  92. [92]
    INetFwPolicy (netfw.h) - Win32 apps | Microsoft Learn
    Feb 22, 2024 · The Windows Firewall API is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent ...Methods · Remarks · RequirementsMissing: NetFwTypeLib integration
  93. [93]
    Windows Firewall Technologies - Win32 apps - Microsoft Learn
    Jan 24, 2023 · The INetFwServices interface is a standard Automation interface which provides access to a collection of services that may be authorized to ...Enumerations · Functions · InterfacesMissing: integration | Show results with:integration
  94. [94]
    About WinINet - Win32 apps | Microsoft Learn
    Feb 20, 2020 · The Windows Internet (WinINet) application programming interface (API) enables your application to interact with FTP and HTTP protocols to access Internet ...
  95. [95]
    About WinHTTP - Win32 apps | Microsoft Learn
    Jan 7, 2021 · Microsoft Windows HTTP Services (WinHTTP) provides you with a server-supported, high-level interface to the HTTP/2 and 1.1 Internet protocols.
  96. [96]
    Monikers - Win32 apps - Microsoft Learn
    Aug 23, 2019 · A moniker in COM is not only a way to identify an object—a moniker is also implemented as an object. This object provides services allowing ...Missing: API | Show results with:API
  97. [97]
    HttpSendRequestA function (wininet.h) - Win32 apps | Microsoft Learn
    Feb 8, 2023 · HttpSendRequest sends the specified request to the HTTP server and allows the client to specify additional headers to send along with the request.
  98. [98]
    IMoniker::BindToObject (objidl.h) - Win32 apps | Microsoft Learn
    Oct 12, 2021 · The URL moniker pulls further information for the bind operation from the bind context. · Next the moniker checks the ROT of the bind context to ...
  99. [99]
    IUri interface (Windows)
    ### Summary of IUri Interface
  100. [100]
    WinHttpConnect function (winhttp.h) - Win32 apps - Microsoft Learn
    Oct 13, 2021 · The WinHttpConnect function specifies the initial target server of an HTTP request and returns an HINTERNET connection handle to an HTTP session for that ...Return Value · Remarks · Examples
  101. [101]
    WinHttpOpenRequest function (winhttp.h) - Win32 apps
    Oct 12, 2021 · The WinHttpOpenRequest function creates a new HTTP request handle and stores the specified parameters in that handle.Parameters · Return Value · Remarks
  102. [102]
    Service Functions - Win32 apps | Microsoft Learn
    Jan 7, 2021 · Sends a control code to a service. CreateService, Creates a service object and adds it to the specified service control manager database.
  103. [103]
    Event Logging Functions - Win32 apps - Microsoft Learn
    Aug 14, 2025 · Reads a whole number of entries from the specified event log. RegisterEventSource, Retrieves a registered handle to the specified event log.
  104. [104]
    Using WMI - Win32 apps - Microsoft Learn
    Jun 1, 2022 · Performance counter data for a system is available through WMI. The system performance library counters are converted to WMI classes. For ...
  105. [105]
    OpenSCManagerA function (winsvc.h) - Win32 apps | Microsoft Learn
    Feb 9, 2023 · Establishes a connection to the service control manager on the specified computer and opens the specified service control manager database.
  106. [106]
    CreateServiceA function (winsvc.h) - Win32 apps - Microsoft Learn
    Jul 26, 2022 · A handle to the service control manager database. This handle is returned by the OpenSCManager function and must have the SC_MANAGER_CREATE_SERVICE access ...
  107. [107]
    Installing a Service - Win32 apps - Microsoft Learn
    Sep 20, 2022 · A service configuration program uses the CreateService function to install a service in the SCM database. The SvcInstall function in the ...
  108. [108]
    OpenServiceA function (winsvc.h) - Win32 apps | Microsoft Learn
    Feb 8, 2023 · A handle to the service control manager database. The OpenSCManager function returns this handle. For more information, see Service Security and Access Rights.
  109. [109]
    Service Security and Access Rights - Win32 apps | Microsoft Learn
    Jan 7, 2021 · The Windows security model enables you to control access to the service control manager (SCM) and service objects.Missing: API | Show results with:API
  110. [110]
    RegisterEventSourceA function (winbase.h) - Win32 - Microsoft Learn
    Feb 22, 2024 · The winbase.h header defines RegisterEventSource as an alias that automatically selects the ANSI or Unicode version of this function based on ...
  111. [111]
    ReportEventA function (winbase.h) - Win32 apps | Microsoft Learn
    Feb 8, 2023 · This function is used to log an event. The entry is written to the end of the configured log for the source identified by the hEventLog parameter.Parameters · Return Value · Remarks
  112. [112]
    Reporting Events - Win32 apps - Microsoft Learn
    Aug 14, 2025 · The Event Logging API was designed for applications that run on the Windows Server 2003, Windows XP, or Windows 2000 operating system.
  113. [113]
    Event Logging Operations - Win32 apps | Microsoft Learn
    Aug 14, 2025 · The OpenEventLog and ReportEvent functions take an optional server name as a parameter so the operations can be performed on the remote server.
  114. [114]
    About Performance Counters - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Windows Performance Counters provide a high-level abstraction layer with a consistent interface for collecting various kinds of system data.
  115. [115]
    Using the PDH Functions to Consume Counter Data - Win32 apps
    Jul 14, 2025 · PDH is a high-level API that simplifies collecting performance counter data. It helps with query parsing, metadata caching, matching up instances between ...
  116. [116]
    Performance Counters - Win32 apps - Microsoft Learn
    Jul 14, 2025 · Windows Performance Counters provide a high-level abstraction layer that provides a consistent interface for collecting various kinds of system data.
  117. [117]
    IWbemServices (wbemcli.h) - Win32 apps - Microsoft Learn
    Oct 5, 2021 · The IWbemServices interface is used by clients and providers to access WMI services. The interface is implemented by WMI and WMI providers, and is the primary ...
  118. [118]
    IWbemServices::ExecQuery (wbemcli.h) - Win32 apps
    Oct 12, 2021 · The IWbemServices::ExecQuery method executes a query to retrieve objects, processing the query and creating an enumerator to access results.
  119. [119]
    IWbemServices::PutInstance (wbemcli.h) - Win32 apps
    Oct 12, 2021 · The IWbemServices::PutInstance method creates or updates an instance of an existing class. The instance is written to the WMI repository.Parameters · Wbem_flag_use_amended_qualif... · Remarks<|control11|><|separator|>
  120. [120]
    COM API for WMI - Win32 apps - Microsoft Learn
    Jan 7, 2021 · Used for semisynchronous calls of the IWbemServices interface. When making such calls, the called IWbemServices method returns immediately, ...
  121. [121]
    Windows Management Instrumentation - Win32 apps | Microsoft Learn
    Jan 23, 2023 · Define the errors that may be returned by Scripting API for WMI calls. ... IWbemServices calls to WMI. All primary calls in IWbemServices ...Class · Enumerations
  122. [122]
    __stdcall | Microsoft Learn
    Feb 10, 2025 · The __stdcall calling convention is used to call Win32 API functions. The callee cleans the stack, so the compiler makes vararg functions __cdecl.Syntax · Remarks
  123. [123]
    Windows Data Types (BaseTsd.h) - Win32 apps - Microsoft Learn
    Nov 7, 2024 · CALLBACK, WINAPI, and APIENTRY are all used to define functions with the __stdcall calling convention. Most functions in the Windows API are ...
  124. [124]
    Using Run-Time Dynamic Linking - Win32 apps - Microsoft Learn
    Jun 16, 2022 · Run-time dynamic linking uses LoadLibrary and GetProcAddress, doesn't need import libraries, and can respond to errors if the DLL is ...
  125. [125]
    LoadLibraryA function (libloaderapi.h) - Win32 apps - Microsoft Learn
    Feb 9, 2023 · LoadLibrary can be used to load a library module into the address space of the process and return a handle that can be used in GetProcAddress to ...
  126. [126]
    GetProcAddress function (libloaderapi.h) - Win32 apps
    Feb 6, 2024 · Retrieves the address of an exported function (also known as a procedure) or variable from the specified dynamic-link library (DLL).
  127. [127]
    Running 32-bit Applications - Win32 apps - Microsoft Learn
    Aug 19, 2020 · WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows. This allows for 32-bit (x86) ...Missing: compatibility | Show results with:compatibility
  128. [128]
    Working with Strings - Win32 apps | Microsoft Learn
    Jul 9, 2024 · The TEXT and TCHAR macros are less useful today, because all applications should use Unicode. The headers for the Microsoft C run-time ...
  129. [129]
    BSTR | Microsoft Learn
    May 30, 2018 · A BSTR (Basic string or binary string) is a string data type that is used by COM, Automation, and Interop functions.Missing: TCHAR | Show results with:TCHAR
  130. [130]
    RECT structure (windef.h) - Win32 apps - Microsoft Learn
    Feb 22, 2024 · The RECT structure defines a rectangle by the coordinates of its upper-left and lower-right corners, using left, top, right, and bottom members.
  131. [131]
    POINT structure (windef.h) - Win32 apps - Microsoft Learn
    Feb 22, 2024 · The POINT structure defines the x- and y-coordinates of a point.
  132. [132]
    MSG structure (winuser.h) - Win32 apps - Microsoft Learn
    Feb 22, 2024 · The MSG structure contains message information from a thread's queue, including a window handle, message identifier, and additional parameters.
  133. [133]
    STARTUPINFOA (processthreadsapi.h) - Win32 apps - Microsoft Learn
    Oct 31, 2022 · A process can use the GetStartupInfo function to retrieve the STARTUPINFO structure specified when the process was created. If a GUI process ...Syntax · Members
  134. [134]
    Structured Exception Handling - Win32 apps - Microsoft Learn
    Jul 14, 2025 · Structured exception handling is a mechanism for handling both hardware and software exceptions, enabling complete control over exception ...
  135. [135]
    GetLastError function (errhandlingapi.h) - Win32 apps
    Feb 6, 2024 · Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each other's ...
  136. [136]
    FormatMessage function (winbase.h) - Win32 apps - Microsoft Learn
    Sep 22, 2022 · Formats a message string. The function requires a message definition as input. The message definition can come from a buffer passed into the function.
  137. [137]
    Retrieving the Last-Error Code - Win32 apps - Microsoft Learn
    Jul 14, 2025 · It can retrieve the last-error code using the GetLastError function and get a description of the error using the FormatMessage function.
  138. [138]
    [MS-ERREF]: HRESULT From WIN32 Error Code Macro
    Mar 30, 2020 · The HRESULT From WIN32 Error Code Macro converts a Win32 error code to an HRESULT using the pattern 0x8007XXXX, where XXXX.
  139. [139]
    RtlNtStatusToDosError function (winternl.h) - Win32 apps
    Nov 20, 2024 · The `RtlNtStatusToDosError` function converts a NTSTATUS code to its equivalent system error code. It returns the corresponding system error ...
  140. [140]
    RaiseException function (errhandlingapi.h) - Win32 - Microsoft Learn
    Feb 2, 2024 · The RaiseException function enables a process to use structured exception handling to handle private, software-generated, application-defined exceptions.
  141. [141]
    OutputDebugStringA function (debugapi.h) - Win32 - Microsoft Learn
    Feb 8, 2023 · In the past, the operating system did not return Unicode strings through OutputDebugStringW (ASCII strings were returned instead).
  142. [142]
    DebugBreak function (debugapi.h) - Win32 apps | Microsoft Learn
    Feb 22, 2024 · Causes a breakpoint exception to occur in the current process. This allows the calling thread to signal the debugger to handle the ...
  143. [143]
    IsDebuggerPresent function (debugapi.h) - Win32 apps
    Feb 12, 2025 · This function allows an application to determine whether or not it is being debugged, so that it can modify its behavior.Missing: DebugBreak | Show results with:DebugBreak
  144. [144]
    Symbol Support | Microsoft Learn
    Apr 21, 2022 · To decode symbols, the tools must locate the program database files, known as program database (PDB) files or symbol files, to build complete call stacks.
  145. [145]
    Install WinDbg - Windows drivers - Microsoft Learn
    Apr 4, 2025 · WinDbg is a debugger that can be used to analyze crash dumps, debug live user-mode and kernel-mode code, and examine CPU registers and memory.Debugging Tools for Windows · What is WinDbg? · Get started with Windows...
  146. [146]
    Event Tracing - Win32 apps | Microsoft Learn
    Jan 7, 2021 · You can use the .NET TraceProcessing API to analyze ETW traces for your applications and other software components. This API is used internally ...Purpose · Where applicable
  147. [147]
    IMFMediaSession interface (mfidl.h) - Win32 apps - Microsoft Learn
    Feb 22, 2024 · Provides playback controls for protected and unprotected content. The Media Session and the protected media path (PMP) session objects expose this interface.
  148. [148]
    Whats New for Media Foundation - Win32 apps | Microsoft Learn
    Mar 3, 2021 · Microsoft Media Foundation was introduced in Windows Vista as the replacement for DirectShow. Of course, DirectShow is still supported in ...
  149. [149]
    IWICBitmapDecoder interface (wincodec.h) - Win32 - Microsoft Learn
    Aug 2, 2021 · Exposes methods that represent a decoder. The interface provides access to the decoder's properties such as global thumbnails (if supported), frames, and ...
  150. [150]
    Direct2D - Win32 apps - Microsoft Learn
    May 26, 2022 · Direct2D is a hardware-accelerated, immediate-mode, 2-D graphics API that provides high performance and high-quality rendering for 2-D geometry, bitmaps, and ...
  151. [151]
    About CNG - Win32 apps | Microsoft Learn
    Jan 7, 2021 · Cryptography API: Next Generation (CNG) is the long-term replacement for the CryptoAPI. CNG is designed to be extensible at many levels and cryptography ...
  152. [152]
    Cryptography API: Next Generation - Win32 apps - Microsoft Learn
    Jul 10, 2025 · CNG is an encryption API that you can use to create encryption security software for encryption key management, cryptography and data ...
  153. [153]
    CryptAcquireContextA function (wincrypt.h) - Win32 apps
    Nov 22, 2024 · The CryptAcquireContext function is used to acquire a handle to a particular key container within a particular cryptographic service provider (CSP).Missing: CryptEncrypt | Show results with:CryptEncrypt
  154. [154]
    Cryptography Functions - Win32 apps - Microsoft Learn
    Aug 19, 2021 · These functions compute hashes of data and also create and verify digital signatures. Hashes are also known as message digests.
  155. [155]
    CNG Cryptographic Primitive Functions - Win32 apps | Microsoft Learn
    May 19, 2025 · Cryptography API: Next Generation (CNG) defines the following functions that are used for performing cryptographic operations.
  156. [156]
    NCryptOpenStorageProvider function (ncrypt.h) - Win32 apps
    Oct 12, 2021 · In this article, the NCryptOpenStorageProvider function loads and initializes a CNG key storage provider.
  157. [157]
    How Windows uses the TPM | Microsoft Learn
    Aug 15, 2025 · This article offers an overview of the TPM, describes how it works, and discusses the benefits that TPM brings to Windows and the cumulative security effect.TPM Overview · TPM in Windows
  158. [158]
    AdjustTokenPrivileges function (securitybaseapi.h) - Win32 apps
    Oct 13, 2021 · The AdjustTokenPrivileges function enables or disables privileges in an access token, but cannot add new privileges.
  159. [159]
    Access Tokens - Win32 apps - Microsoft Learn
    Jul 8, 2025 · AdjustTokenPrivileges, Enables or disables the privileges in an access token. It does not grant new privileges or revoke existing ones.
  160. [160]
    GetTokenInformation function (securitybaseapi.h) - Win32 apps
    Oct 12, 2021 · The GetTokenInformation function retrieves a specified type of information about an access token. The calling process must have appropriate access rights to ...
  161. [161]
    None
    Nothing is retrieved...<|control11|><|separator|>
  162. [162]
    Description of Windows Identity Foundation - .NET Framework
    Dec 18, 2009 · Windows Identity Foundation (WIF) is a new extension to the Microsoft .NET Framework that makes it easy for developers to enable advanced identity capabilities.
  163. [163]
    The Windows Runtime (WinRT) type system - Microsoft Learn
    May 16, 2022 · All WinRT interfaces implicitly require IInspectable; and in turn IInspectable requires IUnknown. IUnknown defines three methods: QueryInterface ...
  164. [164]
    C++/WinRT - UWP applications - Microsoft Learn
    Nov 15, 2023 · C++/WinRT is an entirely standard modern C++17 language projection for Windows Runtime (WinRT) APIs, implemented as a header-file-based library.Introduction to C++/WinRT · Move to C++/WinRT from C++...
  165. [165]
    C#/WinRT - Windows apps | Microsoft Learn
    Mar 15, 2023 · The C#/WinRT NuGet package can be used to both generate C# projections (also called interop assemblies) from WinRT components and in Authoring C ...Motivation for C#/WinRT · What's new
  166. [166]
    Universal Windows Platform (UWP) app lifecycle - Microsoft Learn
    Sep 13, 2023 · This topic describes the lifecycle of a Universal Windows Platform (UWP) application from the time it is activated until it is closed.little history · App execution state
  167. [167]
    XAML overview - Windows apps - Microsoft Learn
    Sep 10, 2025 · XAML is a declarative language for initializing objects and setting properties, creating UI elements, and is the primary format for declaring ...
  168. [168]
    Windows.UI.Xaml Namespace - Windows apps - Microsoft Learn
    Represents a declarative rule that applies visual states based on window properties. Application. Encapsulates the app and its available services.
  169. [169]
  170. [170]
    Introduction to Windows Machine Learning
    ### Summary of Windows ML for On-Device ML Inference and Recent Enhancements
  171. [171]
    Run ONNX models using the ONNX Runtime included in Windows ML
    Aug 15, 2025 · The ONNX Runtime shipped with Windows ML allows apps to run inference on ONNX models locally. Creating an inference session. The APIs are ...
  172. [172]
    Stable channel release notes for the Windows App SDK
    Windows ML enables developers to run ONNX AI models locally on Windows ... The Windows App SDK now includes a suite of artificial intelligence (AI) APIs ...
  173. [173]
    What is Windows AI Foundry? | Microsoft Learn
    May 19, 2025 · Windows AI Foundry offers AI-backed features and APIs on Windows 11 PCs. These features are in active development and run locally in the background at all ...What are Windows AI APIs? · Get started with Phi Silica
  174. [174]
    MDEP.2025.15.2 Release - Microsoft Learn
    Oct 3, 2025 · We're advancing with the MDEP ML Inference API for ONNX runtime, allowing for execution of machine learning models, to support AI features ...
  175. [175]
    MS-DOS Version 4.0 Programmer's Reference - PCjs Machines
    The following document is from the Microsoft Programmer's Library 1.3 CD-ROM. Microsoft MS-DOS Programmer's Reference ... int 21H endm Example: The following ...
  176. [176]
    Why is kernel32.dll running in user mode and not kernel mode, like ...
    Sep 26, 2023 · Set the time machine to 1985. Windows 1.0 consisted of three primary components: KERNEL: Provides low-level services like memory management, ...
  177. [177]
    Computer industry luminaries salute Dave Cutler's five-decade-long ...
    Apr 15, 2016 · In 1988, when the project first began, the team comprised about 20 engineers. By the time the first version of Windows NT shipped five years ...
  178. [178]
    .NET Framework versions and service pack levels - Microsoft Learn
    May 5, 2020 · Registry keys for different .NET Framework and service packs ; 1.0 (shipped with Windows XP Media Center 2005 and Tablet PC 2005), Service Pack 3 ...
  179. [179]
    User Account Control overview - Windows - Microsoft Learn
    Apr 15, 2025 · User Account Control (UAC) is a Windows security feature designed to protect the operating system from unauthorized changes.Missing: Vista | Show results with:Vista
  180. [180]
    Desktop Window Manager - Win32 apps
    ### Summary of DWM API in Windows Vista for Aero Effects
  181. [181]
    Windows Runtime - Reimagining App Development with the ...
    Aug 9, 2015 · It's the modern Windows API surface used to create new Windows Store apps on Windows 8. The Windows Runtime is designed from the ground up ...
  182. [182]
    Motion in Windows - Windows apps
    ### Summary of Fluent Design Motion in Windows 10/11
  183. [183]
    Support snap layouts for desktop apps on Windows 11
    Aug 21, 2024 · Your app should support a minimum width of at most 500 effective pixels (epx) to support snap layouts across the most common screen sizes.
  184. [184]
    What are Windows AI APIs? - Microsoft Learn
    The Windows AI APIs enable AI capabilities without the need to find, run, or optimize your own machine learning (ML) model. The models that power Windows AI ...<|control11|><|separator|>
  185. [185]
    Update WINVER and _WIN32_WINNT - Microsoft Learn
    Jun 30, 2025 · When you upgrade an older project, you may need to update your WINVER or _WIN32_WINNT macros. If they're assigned values for an unsupported ...
  186. [186]
    TaskDialog function (commctrl.h) - Win32 apps | Microsoft Learn
    Oct 12, 2021 · The TaskDialog function creates, displays, and operates a task dialog. The task dialog contains application-defined message text and title, icons, and any ...
  187. [187]
    Apply Mica or Acrylic materials in desktop apps for Windows 11
    Jul 14, 2025 · This article describes how to apply Mica or Acrylic as the base layer of your Windows App SDK/WinUI 3 XAML app.How to use a backdrop material · How to use a system backdrop...
  188. [188]
    About Side-by-Side Assemblies - Win32 apps - Microsoft Learn
    Jan 7, 2021 · A Windows side-by-side assembly is described by manifests. A side-by-side assembly contains a collection of resources—a group of DLLs, ...Missing: API | Show results with:API
  189. [189]
    What's New in Driver Development for Windows 11, Version 24H2
    Sep 23, 2025 · Starting from WDK version 10.0.26100.1, WDK now supports development, testing and deployment of drivers on ARM64 machines. The WDK/EWDK can be ...
  190. [190]
    How emulation works on Arm | Microsoft Learn
    Windows 11 on Arm supports emulation of both x86 and x64 apps. Performance is enhanced with the introduction of the new emulator Prism in Windows 11 24H2.
  191. [191]
    Hotpatching now available for 64-bit Arm architecture - Windows IT ...
    Jul 8, 2025 · Hotpatching is now generally available for your Windows 11, version 24H2 Arm64 devices. More client devices can now experience the power of ...
  192. [192]
    Using the Windows Headers - Win32 apps | Microsoft Learn
    Aug 19, 2020 · The header files for the Windows API enable you to create 32- and 64-bit applications. They include declarations for both Unicode and ANSI versions of the API.
  193. [193]
    WOW64 Implementation Details - Win32 apps | Microsoft Learn
    Aug 19, 2020 · The WOW64 emulator runs in user mode. It provides an interface between the 32-bit version of Ntdll.dll and the kernel of the processor, and it intercepts ...
  194. [194]
    Develop Universal Windows Platform (UWP) apps - Win32 apps
    Feb 20, 2020 · We encourage all desktop (Win32) app ISVs to bring your desktop apps to the Universal Windows Platform (UWP) via the Desktop Bridge.
  195. [195]
    API set loader operation - Win32 apps - Microsoft Learn
    May 31, 2023 · Windows supports two standard techniques to consume and interface with API sets: direct forwarding and reverse forwarding. Direct forwarding.
  196. [196]
    Operating system version changes - Compatibility Cookbook
    Nov 17, 2021 · In Windows 8.1, the GetVersion(Ex) APIs have been deprecated. That means that while you can still call the APIs, if your app does not specifically target ...
  197. [197]
    Operating system version changes in Windows 8.1 ... - Microsoft Learn
    Feb 13, 2024 · Windows 8.1 introduces new replacement API functions for GetVersion(Ex), known as VersionHelpers. They are extremely easy to use.
  198. [198]
    Creating a Custom Compatibility Fix in Compatibility Administrator
    Oct 27, 2022 · A compatibility fix, previously known as a shim, is a small piece of code that intercepts API calls from applications. The fix transforms the ...What is a Compatibility Fix? · Searching for Existing...
  199. [199]
    WineHQ - Run Windows applications on Linux, BSD, Solaris and ...
    A compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD.Download · About Wine · News · Wine 10.0
  200. [200]
    ReactOS Project: Front Page
    Welcome to ReactOS. Imagine running your favorite Windows applications and drivers in an open-source environment you can trust. That's the mission of ReactOS!Download ReactOS 0.4.15 · ReactOS 0.4.15 released · Building ReactOS · GalleryMissing: binary | Show results with:binary
  201. [201]
    With Wine 10 update, run your Windows app on Linux better than ever
    Jan 29, 2025 · Wine provides a compatibility layer capable of running Windows applications on POSIX-compliant operating systems such as Linux, MacOS, and FreeBSD.
  202. [202]
    Wine 10.18 Released with Vulkan-Based OpenGL Mapping - Linuxiac
    Nov 1, 2025 · On November 1, 2025. Wine 10.18 Released with Vulkan-Based OpenGL Mapping. The Wine Project, a compatibility layer that enables Linux and ...
  203. [203]
    ReactOS 0.4.15 Released With Major Improvements - Hackaday
    Mar 25, 2025 · The update introduces sweeping changes to everything from the kernel to the user interface and aspects like the audio system and driver support.
  204. [204]
    Highlights of Cygwin Functionality
    The library exports several Cygwin-specific functions that can be used by external programs to convert a path or path list from Win32 to POSIX or vice versa.
  205. [205]
    Windows Unix-like Development Environments: MinGW64, MSYS2 ...
    Apr 25, 2025 · Cygwin takes the most comprehensive approach to POSIX compatibility: Complete POSIX layer: Implements a robust POSIX compatibility layer via ...
  206. [206]
  207. [207]
    Providing Access to VMware ThinApp Packages - TechDocs
    Jan 10, 2025 · In the ThinApp capture and build processes, you create a virtual application from a Windows application. That virtualized Windows application ...Missing: cross- | Show results with:cross-
  208. [208]
    Get Started with Win32 and C++ - Microsoft Learn
    Jan 27, 2022 · The aim of this Get Started series is to teach you how to write a desktop program in C++ using Win32 and COM APIs.
  209. [209]
    mingw-w64
    Mingw-w64 is a collection of files and tools for building native Windows applications, forked from mingw.org to provide 64-bit support.Pre-built Toolchains · MSYS2 (GCC) · Source Code · Arch Linux
  210. [210]
    Platform Invoke (P/Invoke) - .NET - Microsoft Learn
    May 10, 2024 · P/Invoke is a technology that allows you to access structs, callbacks, and functions in unmanaged libraries from your managed code.
  211. [211]
    java-native-access/jna - GitHub
    JNA provides Java programs easy access to native shared libraries without writing anything but Java code - no JNI or native code is required.
  212. [212]
    wscript | Microsoft Learn
    May 22, 2023 · Windows Script Host provides an environment in which users can execute scripts in various languages that use various object models to perform tasks.
  213. [213]
    VBScript deprecation: Timelines and next steps | Windows IT Pro Blog
    May 22, 2024 · VBScript will be retired and eliminated from future versions of Windows. This means all the dynamic link libraries (.dll files) of VBScript will be removed.
  214. [214]
    Use PowerShell to Interact with the Windows API: Part 1
    Apr 23, 2020 · In Windows PowerShell, there are three ways to interact with Windows API functions: Use the Add-Type cmdlet to compile C# code. This is the ...
  215. [215]
    Rust for Windows, and the windows crate | Microsoft Learn
    Aug 11, 2023 · You can find all of the latest updates in the Release log of the Rust for Windows repo on GitHub. Rust for Windows lets you use any Windows ...
  216. [216]
    Towards Rust in Windows Drivers | Microsoft Community Hub
    Sep 2, 2025 · Over the coming months, we will publish more information about best practices for using Rust in your driver, submitting Rust drivers to WHCP, ...