Windows API alternatives available for Windows Runtime apps

Learn which Windows API features are available for Windows Runtime apps or Universal Windows Platform (UWP) apps, and what alternatives are available for those APIs that don't.

Notice

Some APIs are only supported by Windows Store apps, not Windows Phone Store apps, and vice versa. Specific compatibility details for a specific API can be found in its reference topic or in the associated header file. For more information, see Win32 and COM.

App Install None of the
existing App Install APIs are supported for Windows Runtime apps or UWP apps. Here are some alternatives to the app install API:

App Package
Packaging and Deployment API
Windows.ApplicationModel.Package Class
Windows.Management.Deployment Namespace
Device
A subset of the Device API supported for Windows Runtime apps or UWP apps. For more information, see Win32 and COM (devices).

Below are some alternatives for device APIs that cannot be used with Windows Runtime apps or UWP apps.

Feature Overrides
Bluetooth Windows.Networking.Proximity
Device Enumeration (Function Discovery, PnP-X and WSD) Windows.Devices.Enumeration
Fax None
Location API Windows.Devices.Geolocation
Printing Windows.Graphics.Printing
3D Printing Windows.Graphics.Printing3D
Sensors Windows.Devices.SensorsSerial
and Parallel PortsWindows.Devices.SerialCommunicationSMS
Windows.Devices.Sms
UPnP Windows.Devices.Enumeration.Pnp
Windows Portable DevicesWindows.Devices.Portable
WSD Windows.Devices.EnumerationBatteryWindows.Devices.Power Windows .System.Power


Graphics A subset of
these graphics APIs are at least partially supported for Windows Runtime apps or UWP apps:

Direct2D
Direct3D 11
DirectWrite
DirectXMath
DXGI
WIC
For more information, see Win32 and COM (graphics).

When designing a Windows Runtime app or UWP app, you may want to use HTML5 or XAML to display graphics. For more information, see:

Displaying Graphics (XAML)
Using Graphics (HTML)
Multimedia with Canvas, SVG, and CSS3 A subset of
these multimedia APIs are at least partially supported for Windows Runtime apps or UWP apps:

Kernel Audio
Media Playback
Media Foundation
Windows Audio Session API (WASAPI)
For more information, see Win32 and COM (Multimedia).

When designing a Windows Runtime app or UWP app, you might want to use HTML5 or XAML to integrate media. For more information, see:

If using HTML5 to play native media
files Quickstart: Video and Audio (XAML)
networking A subset of
these networking APIs are at least partially supported for Windows Runtime apps or UWP apps:

DHCP
Mobile Broadband
RPC
Windows Sockets (Winsock)
Windows Web Service
For more information, see Win32 and COM (Network).

Here are some alternatives for network APIs that cannot be used in Windows Runtime apps or UWP apps.

Functional Alternatives
BITS Windows.Networking.BackgroundTransfer
EAP No
Firewall No
HTTP Server No
IP Helper Windows.Networking.Connectivity
NDF No
NLM Windows.Networking.Connectivity
P2P No
QOS Windows.Networking.Sockets
RAS No
SNMP No
TAPI No
WinHTTP Windows.Web .Http and XML HTTP Extended Requests (IXMLHttpRequest2 and IXMLHttpRequest3)
WinINet Windows.Web.Http and XML HTTP Extended Requests (IXMLHttpRequest2 and IXMLHttpRequest3)
Winsock Windows.Networking.Sockets

Print and Document A subset of the
Print and Document API is supported for Windows Store apps. For more information, see Win32 and COM (Printing and Documentation).

When designing your Windows Store app, you may want to provide the best printing experience:

Printing (JavaScript)
Printing (XAML)
Security Existing security APIs for Windows Runtime apps or UWP apps
are not supported. Here are some alternatives to the security API:

Windows.Security.Credentials
Windows.Security.Credentials.UI
Windows.Security.Cryptography
Windows.Security.Cryptography.Certificates
Windows.Security.Cryptography.Core
Windows.Security.Cryptography.DataProtection
Stores A subset of
these store APIs are at least partially supported for Windows Runtime app or UWP app:

Directory Creation, Deletion, and Enumeration
File Mapping
For more information, see Win32 and COM (Data).

Here are some alternatives for storage APIs that cannot be used in Windows Runtime apps or UWP apps.

Functional Alternatives
File Copy, Move and Replace Windows.Storage.StorageFile
Directory Create, Delete and Enumerate Windows.Storage.StorageFolder
IMAPI None
Management (Mount Points, Formats and Quotas) None
Oplock None
Search Windows.Storage.Search
USN Log None

System A subset of
these system APIs are at least partially supported for Windows Runtime apps or UWP apps:

Heap API, an error on thread local storage (TLS) synchronization
See Win32 and COM (system) for details.

Here are some alternatives for system APIs that cannot be used in Windows Runtime apps or UWP apps.

Function Overrides
Console None
Current Directory None
Fiber None
Memory Manager Heap API
Named Pipes None
Power
Windows.Devices.Power
Windows.System.Power
Windows.System.Power.Diagnostics
Registry
Windows.Storage.ApplicationDataContainer
Windows.Storage.ApplicationDataContainerSettings
Thread Pool Windows.System.Threading
number of threads Windows.System.Threading

User Interface A subset of
these user interface APIs are at least partially supported for Windows Runtime apps or UWP apps:

Regional Language Support (NLS)
Strsafe Functions
Text Services Framework (TSF)
UI Automation
Windows Animation Manager
For more information, see Win32 and COM (User Interface).

Here are some alternatives for UI APIs that cannot be used in Windows Runtime apps or UWP apps.

Feature Overrides
Common Controls HTML and XAML
DDE/NetDDE No
DWM No
File Open and File Save
Windows.Storage.Pickers.FileOpenPicker
Windows.Storage.Pickers.FileSavePicker
IMM TSF
Magnifier No
MSAA UI Automation
NLS
Windows.Globalization
Windows.Globalization.DateTimeFormatting
Windows .Globalization.NumberFormatting
RichEdit HTML and XAML
Themes HTML, CSS and XAML
Touch Windows.UI.Input
User: Insert cursor Frame or app for drawing
User : Cursor Windows.UI.Core.CoreCursor
User: Clipboard .Clipboard
User: Control HTML and XAML
User: Display Windows .Graphics.Display User
: High DPI App Aware DPI
User: On-Hook None
User: Icons to represent apps
with tiles User: Keyboard Acceleration Windows.UI.Core.CoreAcceleratorKeys
User: Keyboard Input Windows.Devices.Input
User: MDI None
User : Message Events and Notifications
User: Mouse Input Windows.Devices.Input
User: Multiple Monitors Single Monitor
User : SystemParametersInfo Windows.Devices.Input
User: String Strsafe Function
User : Timer None
User: Shutdown None
User : Windowed
Windows.UI.Core.CoreWindow
Windows.UI.Core.CoreWindowDialog
Windows.UI .Core.CoreWindowFlyout
Windows Animation Manager Windows.UI.Core.AnimationMetrics
Windows Ribbon HTML and XAML

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326670574&siteId=291194637