大网数据广告活动
Windows 系统接口

Windows umbrella libraries

· 52CE 我爱测

An umbrella library is a single static-link library that exports a subset of Win32 APIs. For example, an umbrella lib named OneCore.lib provides the exports for the subset of Win32 APIs that are common to all Windows devices.

Important: The info in this topic applies to all versions of Windows 10, and later. We'll refer to those versions here as "Windows", calling out any exceptions where necessary.

An umbrella library is a single static-link library that exports a subset of Win32 APIs. For example, an umbrella library named OneCore.lib provides the exports for the subset of Win32 APIs that are common to all Windows devices.

The APIs in an umbrella library might be implemented across a range of modules (where a module is either an API set or a DLL). But the umbrella library abstracts that detail away from you, making your app more portable across operating system versions. In your desktop app or driver, simply link the umbrella library that contains the set of APIs that you're interested in, and that's all you need to do.

Library Description
OneCore.lib Provides the exports for the subset of Win32 APIs that are common to all Windows 10 devices, and later. Link OneCore.lib (and no other libraries) to access those APIs. If you link OneCore.lib, and you call only Win32 APIs in that library, then your desktop app or driver will load successfully on all Windows 10 devices, and later.
OneCore_apiset.lib Provides the same coverage as OneCore.lib, but uses API set direct forwarding. Linking OneCore_apiset.lib will be compatible only with the Windows version, or later, relevant to the SDK version you're targeting.
OneCoreUap.lib Provides the exports for the subset of Win32 APIs that are common to all Windows 10 devices, and later, that support the Windows Runtime (WinRT). Link OneCoreUap.lib (and no other libraries) to access those APIs. If you link OneCore.lib, and you call only Win32 APIs in that library, then your desktop app or driver will load successfully on all Windows 10 devices, and later, that support the UWP.
OneCoreUAP_apiset.lib Provides the same coverage as OneCoreUAP.lib, but uses API set direct forwarding. Linking OneCoreUAP_apiset.lib will be compatible only with the Windows version, or later, relevant to the SDK version you're targeting.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。