- Win32 API Support for Print Capabilities
- Windows API sets
- Linking to umbrella libraries
- API set contract names
- Identifying API sets for Win32 APIs
- Win32 API
- Содержание
- Общие сведения
- Версии
- Полный алфавитный список технологий, доступных через Windows API
- См. также
- Ссылки
- Литература
- Смотреть что такое «Win32 API» в других словарях:
Win32 API Support for Print Capabilities
The Windows Vista print subsystem provides compatibility support that enables Windows Presentation Foundation (WPF) applications to use GDI-based print drivers and enables Microsoft Win32-based applications to use XPSDrv print drivers. This compatibility is provided through a layer of software shims. Shims are software modules that perform transformation operations on the data so that otherwise incompatible software can interoperate. The following figure shows the data paths of this implementation for Print Capabilities.
Both XPSDrv print drivers and GDI-based, version 3 print drivers support the DrvDeviceCapabilities function. When a Win32 application calls DrvDeviceCapabilities or the GetDevCap function, the print subsystem will call DrvDeviceCapabilities to collect the device capability information from the print driver.
When a WPF application requests a PrintCapabilities document from a print driver, the print subsystem will do one of the following:
If the print driver supports the IPrintTicketProvider interface, the print subsystem will query the print driver for the PrintCapabilities document by using the IPrintTicketProvider::GetPrintCapabilities method.
If the print driver does not support the IPrintTicketProvider interface, the Print Ticket Manager will query the DrvDeviceCapabilities function of the print driver and use the returned information to create a PrintTicket document that is returned to the application.
For more information about how the IPrintTicketProvider interface is supported by Microsoft print drivers, see Printer Driver and Plug-in Interface Design in Windows Vista.
Windows API sets
All versions of Windows 10 share a common base of OS components that is called the core OS (in some contexts this common base is also called OneCore). In core OS components, 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 in which a given Win32 API is implemented and the functional contract to which the API belongs. The decoupling that API sets provide between implementation and contracts offers many engineering advantages for developers. In particular, using API sets in your code can improve compatibility with all Windows 10 devices.
API sets specifically address the following scenarios:
Although the full breadth of the Win32 API is supported on PCs, only a subset of the Win32 API is available on other Windows 10 devices such as HoloLens, Xbox, and other devices running Windows 10x. The API set name provides a query mechanism to cleanly detect whether an API is available on any given device.
Some Win32 API implementations exist in DLLs with different names across different Windows 10 devices. Using API set names instead of DLL names when detecting API availability and delay loading APIs provide a correct route to the implementation no matter where the API is actually implemented.
Linking to umbrella libraries
To make it easier to restrict your code to Win32 APIs that are supported in the core OS, we provide a series of umbrella libraries. For example, an umbrella library named OneCore.lib provides the exports for the subset of Win32 APIs that are common to all Windows 10 devices.
The APIs in an umbrella library may be implemented across a range of modules. The umbrella library abstracts those details away from you, making your code more portable across Windows 10 versions and devices. Instead of linking to libraries such as kernel32.lib and advapi32.lib, simply link your desktop app or driver with the umbrella library that contains the set of core OS APIs that you’re interested in.
API set contract names
API sets are identified by a strong contract name that follows these standard conventions recognized by the library loader.
- The name must begin either with the string api- or ext-.
- Names that begin with api- represent APIs that are guaranteed to exist on all Windows 10 versions.
- Names that begin with ext- represent APIs that may not exist on all Windows 10 versions.
- The name must end with the sequence l — — , where n consists of decimal digits.
- The body of the name can be alphanumeric characters, or dashes (—).
- The name is case insensitive.
Here are some examples of API set contract names:
- api-ms-win-core-ums-l1-1-0
- ext-ms-win-com-ole32-l1-1-5
- ext-ms-win-ntuser-window-l1-1-0
- ext-ms-win-ntuser-window-l1-1-1
You can use an API set name in the context of a loader operation such as LoadLibrary or P/Invoke instead of a DLL module name to ensure a correct route to the implementation no matter where the API is actually implemented on the current device. However, when you do this you must append the string .dll at the end of the contract name. This is a requirement of the loader to function properly, and is not considered actually a part of the contract name. Although contract names appear similar to DLL names in this context, they are fundamentally different from DLL module names and do not directly refer to a file on disk.
Except for appending the string .dll in loader operations, API set contract names should be considered an immutable identifier that corresponds to a specific contract version.
Identifying API sets for Win32 APIs
To identify whether a particular Win32 API belongs to an API set, review the requirements table in the reference documentation for the API. If the API belongs to an API set, the requirements table in the article lists the API set name and the Windows version in which the API was first introduced to the API set. For examples of APIs that belong to an API set, see these articles:
Win32 API
Windows API (application programming interfaces) — общее наименование целого набора базовых функций интерфейсов программирования приложений операционных систем семейств Windows и Windows NT корпорации «Майкрософт». Является самым прямым способом взаимодействия приложений с Windows. Для создания программ, использующих Windows API, «Майкрософт» выпускает библиотек, утилит и других инструментальных средств.
Содержание
Общие сведения
Windows API был изначально спроектирован для использования в программах, написанных на языке C (или C++). Работа через Windows API — это наиболее близкий к системе способ взаимодействия с ней из прикладных программ. Более низкий уровень доступа, необходимый только для драйверов устройств, в текущих версиях Windows предоставляется через Windows Driver Model.
Версии
- Win16 — первая версия Windows API для 16-разрядных версий Windows. Изначально назывался просто Windows API, затем стал называться Win16 для отличия от Win32.
- Win32s — подмножество Win32, устанавливаемое на семейство 16-разрядных систем Windows 3.x и реализующее ограниченный набор функций Win32 API для этих систем.
- Win32 — 32-разрядный API для современных версий Windows. Самая популярная ныне версия. Базовые функции этого API реализованы в kernel32.dll и advapi32.dll; базовые модули GUI — в user32.dll и gdi32.dll. Win32 появился вместе с Windows NT и затем был перенесён (в несколько ограниченном виде) в системы серии Windows 9x. В современных версиях Windows, происходящих от Windows NT, работу Win32 GUI обеспечивают два модуля: csrss.exe (Client/Server Runtime Subsystem), работающий в пользовательском режиме, и win32k.sys в режиме ядра. Работу же системных Win32 API обеспечивает ядро — ntoskrnl.exe
- Win64 — 64-разрядная версия Win32, содержащая дополнительные функции для использования на 64-разрядных компьютерах. Win64 API можно найти только в 64-разрядных версиях Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008 и Windows 7.
Полный алфавитный список технологий, доступных через Windows API
- Access Control
- Active Accessibility
- Active Directory
- Active Directory Services Interface (ASP)
- ActiveX Data Objects (
- Automation
- Background Intelligent Transfer Service (BITS)
- Certificate Services
- Collaboration Data Objects
- Cryptography
- Debugging and Error Handling
- Device I/O
- Distributed File System (Dfs)
- Threads
- Domain Name System (DHCP)
- Extensible Authentication Protocol (XML) и парсер
- Group Policy
- ICS и ICF
- Image Color Management (ICM)
- Indexing Service
- Infrared Data Association (IrDa)
- Internet Authentication Service (IAS)
- Internet Connection Sharing and Firewall (ICSF)
- Internet Explorer
- Internet Information Services (IIS)
- Internet Protocol Helper (IP Helper)
- Interprocess Communications
- Lightweight Directory Access Protocol (LSA Authentication
- LSA Policy
- Memory Management
- Message Queuing (MSMQ)
- Messaging Application Programming Interface (
- Microsoft Agent
- Microsoft Data Access Components (MIDL)
- Microsoft Management Console (MTS)
- Multicast Address Dynamic Client Allocation Protocol (MADCAP)
- Multicast Group Manager
- National Language Support
- NetMeeting
- NetShell
- Network Load Balancing Provider
- Network Management
- Network Monitor
- Network Provider API
- OLE DB
- OLE DB Provider for Internet Publishing
- OnNow
- Open Database Connectivity (OpenGL
- Password Filters
- PC Health
- Performance Monitoring
- Plug and Play и Universal Plug and Play
- Power Management
- Quality of Service (
- Remote Access Service (RAS)
- Remote Procedure Call (имеется в виду служба RPC Service)
- Removable Storage Manager (RSM)
- Routing and Remote Access Service (RRAS)
- Routing Table Manager Version 1 (RTMV1)
- Routing Table Manager Version 2 (RTMV2)
- Security Support Provider Interface (SSPI)
- Server Cluster API
- Server Data Objects (SDO)
- Service Security Attachments
- Setup API
- Shell (имеется в виду Explorer Shell)
- Side-by-side Assemblies
- Simple Network Management Protocol (
- Still Image
- Storage и Structured Storage
- Synchronization Manager
- System.DirectoryServices
- System Event Notification Service (SENS)
- System Restore
- Tablet PC
- Task Scheduler
- Telephony Application Programming Interface (TAPI) 2.2
- Telephony Application Programming Interface (TAPI) 3
- Telephony Service Provider Interface (TSPI и MSPI)
- Terminal Services
- Text Services Framework
- Unicode (и MSLU)
- Universal Description, Discovery, and Integration (
- Windows Clustering
- Windows File Protection
- Windows
- Windows Image Acquisition (WIA)
- Windows Installer
- Windows Management Instrumentation (
- Windows Sockets
- Windows System Information
- Windows User Interface
- Winlogon и Gina
- WinSNMP
См. также
Ссылки
- WinAPI @ dmoz.org
- windows api programming — Форум клуба программистов
- Platform SDK: Windows API — раздел Windows API в библиотеке MSDN
- Открытая документация по WinAPI
Литература
- Гэри Неббет Справочник по базовым функциям API Windows NT/2000 = Windows NT/2000 Native API Reference. — М.: «Вильямс», 2002. — С. 528. — ISBN 1-57870-199-6
Программные интерфейсы и Microsoft Windows | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Графика | Проводник Windows • Direct3D • Windows Presentation Foundation • Windows Color System • Windows Image Acquisition • Windows Imaging Component | |||||||||||
Звук | MME | |||||||||||
Мультимедиа | DirectShow • Windows Media • Media Foundation | |||||||||||
Веб | MSHTML • JScript • ActiveX • | |||||||||||
Доступ к данным | Компоненты Microsoft Data Access • Extensible Storage Engine • | |||||||||||
Сети | Winsock (LSP) • Filtering Platform • | |||||||||||
Коммуникации | TAPI | |||||||||||
Администрирование | Консоль Win32 • Windows Script Host • Инструментарий управления Windows • PowerShell • Планировщик задач • Offline Files • Теневое копирование • Windows Installer • Диспетчер ошибок Windows • Журнал событий Windows | |||||||||||
Модель компонентов | COM • COM+ • DCOM • .NET Framework | |||||||||||
Библиотеки | Microsoft Foundation Classes (MFC) • Active Template Library (ATL) • Windows Template Library (WTL) • Framework Class Library (FCL) | |||||||||||
Разработка драйверов | Модель драйверов Windows • Windows Driver Foundation (KMDF • UMDF) | |||||||||||
Безопасность | Windows CardSpace • Data protection API • Security Support Provider Interface | |||||||||||
.NET | .NET Framework • ADO.NET • .NET Remoting • Windows Presentation Foundation • Windows Workflow Foundation • Windows Communication Foundation • Windows CardSpace • XNA • | |||||||||||
Межпроцессное взаимодействие | MSRPC • Именованные каналы | |||||||||||
Текст и поддержка языков | Framework Текстовых сервисов • Объектная модель текстов • • Языковые пакеты • Многоязычный интерфейс | |||||||||||
Игры | XNA • | |||||||||||
Widget toolkit | ||||||||||||
Low-level | Macintosh Toolbox/Carbon · Windows API · Intrinsics · Intuition · High-level |
|