Content deleted Content added
No edit summary |
m →External links: HTTP to HTTPS for Blogspot |
||
(38 intermediate revisions by 18 users not shown) | |||
Line 1:
{{Short description|List of main shared-libraries of Microsoft Windows}}
{{multiple issues|
{{more citations needed|date=February 2013}}
{{Update|date=September 2024}}
}}
The [[Microsoft Windows]] [[operating system]] and [[Microsoft Windows SDK]]
== Library sources ==
▲The [[Microsoft Windows]] operating system supports a form of [[shared libraries]] known as "[[Dynamic-link library|dynamic-link libraries]]", which are code libraries that can be used by multiple processes while only one copy is loaded into [[computer memory|memory]]. This article provides an overview of the core libraries that are included with every modern Windows installation, on top of which most Windows applications are built.
The Windows operating system contains [[Compiler|compiled]] versions of these libraries known as [[dynamic-link libraries|dynamically-linked libraries]] ([[.dll]]), which are [[Portable Executable|executable]] libraries that can be used by multiple [[Computer program|programs]] while only one copy of the library is loaded into [[computer memory|memory]]. These are canonically referred to as [[system libraries]] and all programs installed on the system can utilize them.
The Windows SDK additionally distributes compiled versions of these libraries known as [[Statically linked library|statically-linked libraries]] ([[.lib]]), which are non-executable libraries that, in whole or in part, can be embedded into a program when it is compiled.{{disputed inline|talkpage=Talk:Microsoft Windows library files#Do SDKs include statically-linked libraries or import libraries?|date=July 2025}} The most common Windows compilers being [[Visual Studio|Microsoft Visual Studio]] and [[Mingw-w64|MinGW]].
== Internal components ==
=== HAL.DLL ===▼
=== NTDLL.DLL ===
NTDLL.DLL exports the Windows [[Native API]]. The Native API is the interface used by user-mode components of the operating system that must run without support from [[Win32]] or other API subsystems. Most of this API is implemented in '''NTDLL.DLL''' and at the upper edge of [[ntoskrnl.exe]] (and its variants), and the majority of exported symbols within these libraries are prefixed '''Nt''', for example '''NtDisplayString'''. Native APIs are also used to implement many of the "kernel APIs" or "base APIs" exported by KERNEL32.DLL.<ref name="Eldad-2011-pp68-69">{{cite book|author=Eilam, Eldad|title=Reversing: Secrets of Reverse Engineering|publisher=John Wiley & Sons|year=2011|isbn=978-1-118-07976-8|pages=68–69|url=https://books.google.com/books?id=_78HnPPRU_oC&pg=PT68}}</ref><ref name="nativeapplications">{{cite web|url=
Applications that are [[Linker (computing)|linked]] directly against this library are said to use the '''native subsystem'''; the primary reason for their existence is to perform tasks that must run early in the system startup sequence before the Win32 subsystem is available. An obvious but important example is the creation of the Win32 subsystem process, [[csrss.exe]]. Before the csrss.exe process exists, no Win32 processes may be created, therefore the process that creates it (Smss.exe, the "session manager") must use the native subsystem. [[csrss.exe]] itself is such an application.
Line 31 ⟶ 20:
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 '''[[chkdsk]]''' during the system initialization "Blue Screen"<!--do not link this to "Blue Screen of Death (BSOD)"! This is not it!-->. Other prominent examples are the services that implement the various subsystems, such as [[csrss.exe]].
Unlike [[Win32]] applications, native applications instantiate within the Kernel runtime code ([[ntoskrnl.exe]]) and so they must have a different entry point ('''NtProcessStartup''', rather than '''(w)(Win)MainCRTStartup''' as is found in a Win32 application),<ref name="nativeapplications"/> obtain their command-line arguments via a pointer to an in-memory structure, manage their own memory using the '''Rtl''' heap API, (which the Win32 heap APIs are just wrappers around—no real difference there) and return execution with a call to '''RtlExitUserProcess''' (as opposed to '''ExitProcess'''). A common library linked with Native applications is nt.lib, which contains startup code for Native applications, similar to how the C runtime provides startup code for Win32 apps.<ref
Most of the Native API is not publicly documented or supported. This allows the API to evolve without having to guarantee [[backwards compatibility]], and breaking changes are thus possible without notification. Native Applications can be built using the Windows Driver Development Kit.<ref>{{cite web | title=Windows Server 2003 DDK | website=[[Microsoft]] | url=http://www.microsoft.com/whdc/devtools/ddk/default.mspx }}</ref>
== Win32 API ==
Line 40 ⟶ 29:
=== KERNEL32.DLL ===
KERNEL32.DLL exposes to applications most of the Win32 base APIs, such as [[memory management]], [[input/output
|url=https://learn.microsoft.com/en-us/dotnet/framework/interop/identifying-functions-in-dlls
|title=Identifying Functions in DLLs
|website=.NET Framework documentation
|via=[[Microsoft Learn]]
|publisher=Microsoft
|date=2022-03-11
}}</ref>
=== GDI32.DLL ===
GDI32.DLL exports [[Graphics Device Interface|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.<ref name="VSDC1" /><ref>See also, the documentation for the [[Wine (emulator)|Wine]] implementation of GDI32.DLL: [http://source.winehq.org/WineAPI/gdi32.html Wine API: gdi32.dll]</ref>
Initially, GDI supported 16 and 256 color [[Enhanced Graphics Adapter|EGA]]/[[VGA]] [[display cards]] and [[monochrome]] printers. The functionality has expanded over the years, and now includes support for things like [[
=== USER32.DLL ===<!-- This section is linked from [[Graphics Device Interface]] -->
Line 55 ⟶ 51:
=== 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'.<ref>{{Cite web|url=https://
=== WS2_32.DLL ===
Line 63 ⟶ 60:
=== ADVAPI32.DLL ===
'''ADVAPI32.DLL''', the Advanced Windows 32 Base API DLL,<ref>{{cite web|title=How RPC Works: Remote Procedure Call (RPC) {{!}} Microsoft Learn|author=[[Microsoft]]|date=8 October 2009 |url=https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc738291(v=ws.10)|access-date=11 September 2023}}</ref> provides security calls and functions for manipulating the [[Windows Registry]].
=== NETAPI32.DLL ===
Line 73 ⟶ 70:
== Other APIs ==
=== SHSCRAP.DLL ===
'''SHSCRAP.DLL''' is part of the [[Object Linking and Embedding|Object Linking and Embedding (OLE)]] mechanism. It implements support for [[Shell Scrap Object File|shell scrap file]]s, which are automatically created when you drag selected content from an OLE-capable application into an Explorer window or desktop,<ref>{{cite web |url=https://support.microsoft.com/en-us/kb/138275/ |title=WD: What is a Scrap (.shs) file? |work=Microsoft Knowledge Base |url-status=dead |archive-date=2015-08-11 |archive-url=https://web.archive.org/web/20150811125202/https://support.microsoft.com/en-us/kb/138275/}}</ref> but you can also use the [[Object Packager]] to create them. They can then be dragged into another OLE-capable application.
This functionality was removed from Windows Vista (and therefore later versions) to improve security and rid the operating system of generally unused functionality.<ref name="scrap_the_scraps">{{cite web|url=https://
=== WINMM.DLL ===
Line 95 ⟶ 92:
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|Visual Studio 2015]]), most of the C/C++ runtime was moved into a new DLL, UCRTBASE.DLL,
Source code for runtime libraries is included in Visual C++<ref>{{cite web | url=
=== Other runtime libraries ===
Line 104 ⟶ 102:
* '''MSVBVM60.DLL''' – [[Visual Basic]] 6.0 Virtual Machine ([[Visual Basic.NET]] programs require [[.NET Framework]] instead)
* '''VCOMP*.DLL''' – Microsoft [[OpenMP]] runtime
* '''VCRUNTIME*.DLL''' – Microsoft
* '''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 [[C Sharp (programming language)|C#]], [[Visual Basic.NET]], [[C++/CLI]] and other .NET languages require the [[.NET Framework]]. It has many libraries (one of them is '''mscorlib.dll'''{{snd}} Multilanguage Standard Common Object Runtime Library, formerly Microsoft Common Object Runtime Library<ref>{{Cite web|url=http://weblogs.asp.net/mreynolds/archive/2004/01/31/65551.aspx|title = What does the "ms" in "mscorlib" stand for - hint: It's not "Microsoft"| date=31 January 2004 }}</ref>) and so-called [[Assembly (CLI)|assemblies]] (e.g. '''System.Windows.Forms.dll''').
== See also ==
* [[Architecture of Windows NT]]
* [[
* [[List of Microsoft Windows components]]
* [[Windows API]]
* [[Dynamic
== References ==
Line 126 ⟶ 124:
* [https://web.archive.org/web/20060315213024/http://www.sysinternals.com/Information/NativeApi.html Native API reference]
* [http://undocumented.ntinternals.net/ Unofficial website that documents most of the Native API methods]
* [
{{Windows Components}}
|