Microsoft Windows library files
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
|
The
Internal components
HAL.DLL is a kernel-mode library file and it cannot be used by any user-mode program. NTDLL.DLL is only used by some programs, but it is a dependency of most Win32 libraries used by programs.
HAL.DLL
The Windows
For example, responding to an interrupt is quite different on a machine with an Advanced Programmable Interrupt Controller (APIC) than on one without. The HAL provides a single function for this purpose that works with all kinds of interrupts by various chipsets, so that other components need not be concerned with the differences.
The HAL is loaded into kernel address space and runs in kernel mode, so routines in the HAL cannot be called directly by applications, and no user mode APIs correspond directly to HAL routines. Instead, the HAL provides services primarily to the Windows executive and kernel and to kernel mode device drivers. Although drivers for most hardware are contained in other files, commonly of file type .sys, a few core drivers are compiled into hal.dll.
Kernel mode device drivers for devices on buses such as
On
platforms there is just one possible hal.dll for each CPU architecture. On Windows 8 and later, the x86 version also only has one HAL.HAL is merged (or statically linked) into ntoskrnl.exe[2] starting with version 2004 of Windows 10, and the dll only serves as a stub for backwards compatibility.
NTDLL.DLL
NTDLL.DLL exports the Windows
Applications that are
Despite having an ".exe" file extension, native applications cannot be executed by the user (or any program in the Win32 or other subsystems). An example is the autochk.exe binary that runs
Unlike
Though most of the API is undocumented, Native Applications can be built using the Windows Driver Development Kit; many
Win32 API
The libraries in this section each implement various subsets of the Win32 API.
KERNEL32.DLL
KERNEL32.DLL exposes to applications most of the Win32 base APIs, such as
GDI32.DLL
GDI32.DLL exports Graphics Device Interface (GDI) functions that perform primitive drawing functions for output to video displays and printers. It is used, for example, in the XP version of Paint. Applications call GDI functions directly to perform low-level drawing (line, rectangle, ellipse), text output, font management, and similar functions.[8][9]
Initially, GDI supported 16 and 256 color
USER32.DLL
USER32.DLL implements the Windows USER component that creates and manipulates the standard elements of the Windows user interface, such as the desktop, windows, and menus. It thus enables programs to implement a graphical user interface (GUI) that matches the Windows look and feel. Programs call functions from Windows USER to perform operations such as creating and managing windows, receiving window messages (which are mostly user input such as mouse and keyboard events, but also notifications from the operating system), displaying text in a window, and displaying message boxes.
Many of the functions in USER32.DLL call upon GDI functions exported by GDI32.DLL to do the actual rendering of the various elements of the user interface. Some types of programs will also call GDI functions directly to perform lower-level drawing operations within a window previously created via USER32 functions.
COMCTL32.DLL
COMCTL32.DLL implements a wide variety of standard Windows controls, such as File Open, Save, and Save As dialogs, progress bars, and list views. It calls functions from both USER32.DLL and GDI32.DLL to create and manage the windows for these UI elements, place various graphic elements within them, and collect user input.
COMDLG32.DLL
COMDLG32.DLL, the Common Dialog Box Library, implements a wide variety of Windows dialog boxes intended to perform what Microsoft deems 'common application tasks'. Starting with the release of Windows Vista, Microsoft considers the "Open" and "Save as" dialog boxes provided by this library as deprecated and replaced by the 'Common Item Dialog API'.[11]
WS2_32.DLL
WS2_32.DLL implements the Winsock API, which provides TCP/IP networking functions and provides partial, broken compatibility with other network APIs. wsock.dll and wsock32.dll are older versions for Win3.11 and Win95 compatibility.
ADVAPI32.DLL
ADVAPI32.DLL, the Advanced Windows 32 Base API DLL,[12] provides security calls and functions for manipulating the Windows Registry.
NETAPI32.DLL
NETAPI32.DLL provides functions for querying and managing network interfaces.
OLE32.DLL
OLE32.DLL provides the Component Object Model, as well as Object Linking and Embedding.
Other APIs
SHSCRAP.DLL
SHSCRAP.DLL is part of the
This functionality was removed from Windows Vista (and therefore later versions) to improve security and rid the operating system of generally unused functionality.[14] Scrap (.shs) files have been used by viruses because they can contain a wide variety of files (including executable code), and the file extension is not shown even when "Hide file extensions from known file types" is disabled.[15] The functionality can be restored by copying registry entries and the DLL from a Windows XP system.[16]
WINMM.DLL
WINMM.DLL provides access to the original
IMM32.DLL
IMM32 is responsible for invoking and interacting with the
Runtime libraries
MSVCRT.DLL, MSVCP*.DLL and CRTDLL.DLL
MSVCRT.DLL is the
It has shipped with Windows versions since Windows 95 OSR2.5 for use by other Windows components; earlier versions shipped with the CRTDLL.DLL library instead. In older versions of Windows, programs which linked against MSVCRT.DLL were expected to install a compatible copy in the System32 folder, but this contributed to DLL Hell because many installers failed to check the library version against the installed version before replacing it.
Versions of MSVC before 4.0 and from 7.0 to 12.0 used differently named DLLs for each version (MSVCR20.DLL, MSVCR70.DLL, MSVCR71.DLL, MSVCP110.DLL, etc.). Applications are required to install the appropriate version,[17] and Microsoft offers Visual C++ Redistributable packages for this purpose, though Windows typically comes with one version already installed.
This runtime library is used by programs written in Visual C++ and a few other compilers (e.g. MinGW). Some compilers have their own runtime libraries.
With Version 14.0 (Visual Studio 2015), most of the C/C++ runtime was moved into a new DLL, UCRTBASE.DLL, that is strictly C99 compliant[1]. Universal C Run Time (UCRT) from Windows 10 onwards become a component part of Windows[2], so every compiler (either non MS, like GCC or Clang/LLVM) can link against UCRT[3]. However, C/C++ programs using UCRTBASE.DLL are forced to link against another new DLL, the VCRuntime. At Version 14.0, this was VCRUNTIME140.DLL.[18] The name has the potential to change at future versions, but has not done so as far as of Version 17.0.
Source code for runtime libraries is included in Visual C++[19] for reference and debugging (e.g. in C:\Program Files\Microsoft Visual Studio 11.0\VC\crt\src
).
Other runtime libraries
- ATL*.DLL – Active Template Library
- MFC*.DLL – Microsoft Foundation Classes
- MSVBVM60.DLL – Visual Basic.NET programs require .NET Frameworkinstead)
- VCOMP*.DLL – Microsoft OpenMP runtime
- VCRUNTIME*.DLL – Microsoft VCRuntime, for MSVC 14.0+
- MSVCIRT.DLL – Microsoft C++ Library, contains the deprecated C++ classes from <iostream.h> (note the file extension) for MS C 9 and 10 (MSVC 2.x, 4.x) (Back then, the draft C++ Standard Library was integrated within MSVCRT.DLL. It was split up with the release of Visual C++ 5.0)
.NET Framework libraries
Programs written in
See also
- Architecture of Windows NT
- Windows NT startup process
- List of Microsoft Windows components
- Windows API
- Dynamic link library
References
- ISBN 978-1-59822-061-2.
- ^ @PetrBenes (July 25, 2019). "Did I miss something? Routines..." (Tweet) – via Twitter.
- ISBN 978-1-118-07976-8.
- ^ a b "Inside Native Windows Applications". Microsoft. Archived from the original on 2010-09-12. Retrieved 2011-12-14.
- ISBN 978-0-7356-3796-2.
- ISBN 978-3-540-49496-6.
- ^ "Inside Native Applications". Archived from the original on 2010-10-23. Retrieved 2017-08-26.
- ^ a b Visual Studio Developer Center: Identifying Functions in DLLs
- Wine implementation of GDI32.DLL: Wine API: gdi32.dll
- ISBN 978-0-13-086985-2.
- ^ "Common Dialog Box Library (Windows)". msdn.microsoft.com. Retrieved 2017-10-25.
- ^ Microsoft. "How RPC Works: Remote Procedure Call (RPC) | Microsoft Learn". Retrieved 11 September 2023.
- ^ "WD: What is a Scrap (.shs) file?". Microsoft Knowledge Base.
- ^ Raymond Chen. "Windows Confidential: Scrapping the Scraps". Retrieved 2011-12-14.
- ^ "VBS.Stages.A". symantec.com.
- ^ "How to open SHS files". Retrieved 2011-12-14.
- ^ "C Run-Time Libraries". Archived from the original on 2011-12-07. Retrieved 2011-12-14.
- ^ "C++ binary compatibility 2015-2022".
- ^ "Source Code for the C Run-Time Functions".
- ^ "What does the "ms" in "mscorlib" stand for - hint: It's not "Microsoft"".
External links
- API calls list (USER32.DLL) Archived 2015-11-21 at the Wayback Machine – Tips for using the User API Client Library with Visual Basic
- API calls list (KERNEL32.DLL) Archived 2015-11-21 at the Wayback Machine – Tips for using the Kernel API Client Library with Visual Basic
- Native API reference
- Unofficial website that documents most of the Native API methods
- Retrieving the KERNEL32.DLL base address