Alternatives to Windows APIs in Windows 8.x apps
Learn which features of the Windows API can be used in a Windows Runtime app or Universal Windows Platform (UWP) app and which APIs to use as alternatives for those that cannot.
Note
Some API are supported only for Windows Store apps and not Windows Phone Store apps, and vice-versa. Specific compatibility details for a particular API can be found in its reference topic or relevant header file. For more information, see Win32 and COM
App installation
None of the existing app installation APIs are supported in a Windows Runtime app or UWP app. Here's some alternatives to the app installation APIs:
- App packages
- Packaging and deployment API
- Windows.ApplicationModel.Package class
- Windows.Management.Deployment namespace
Devices
A subset of the device APIs is supported in a Windows Runtime app or UWP app. For more info, see Win32 and COM (devices).
For device APIs that cannot be used in a Windows Runtime app or UWP app, here are some alternatives.
| Feature | Alternative |
|---|---|
| Bluetooth | Windows.Networking.Proximity |
| Device enumeration (Function Discovery, PnP-X, WSD) | Windows.Devices.Enumeration |
| FAX | none |
| Location API | Windows.Devices.Geolocation |
| Windows.Graphics.Printing | |
| 3D Printing | Windows.Graphics.Printing3D |
| Sensors | Windows.Devices.Sensors |
| Serial and parallel ports | Windows.Devices.SerialCommunication |
| SMS | Windows.Devices.Sms |
| UPnP | Windows.Devices.Enumeration.Pnp |
| Windows Portable Devices | Windows.Devices.Portable |
| WSD | Windows.Devices.Enumeration |
| Battery |
Graphics
Subsets of these graphics APIs are at least partially supported in a Windows Runtime app or UWP app:
- Direct2D
- Direct3D 11
- DirectWrite
- DirectXMath
- DXGI
- WIC
For more info, see Win32 and COM (graphics).
When designing a Windows Runtime app or UWP app, you'll likely want to use HTML5 or XAML to display graphics. For more info, see:
- Displaying graphics (XAML)
- Using graphics with canvas, SVG, and CSS3 (HTML)
Multimedia
Subsets of these multimedia APIs are at least partially supported in a Windows Runtime app or UWP app:
- Core audio
- Media Playback
- Media Foundation
- Windows Audio Session API (WASAPI)
For more info, see Win32 and COM (multimedia).
When designing a Windows Runtime app or UWP app, you'll likely use HTML5 or XAML to integrate media. For more info, see:
Networking
Subsets of these networking APIs are at least partially supported in a Windows Runtime app or UWP app:
- DHCP
- Mobile Broadband
- RPC
- Windows Sockets (Winsock)
- Windows Web Services
For more info, see Win32 and COM (networking).
Here's some alternatives to networking APIs that cannot be used in a Windows Runtime app or UWP app.
| Feature | Alternative |
|---|---|
| BITS | Windows.Networking.BackgroundTransfer |
| EAP | none |
| Firewall | none |
| HTTP server | none |
| IP Helper | Windows.Networking.Connectivity |
| NDF | none |
| NLM | Windows.Networking.Connectivity |
| P2P | none |
| QOS | Windows.Networking.Sockets |
| RAS | none |
| SNMP | none |
| TAPI | none |
| WinHTTP | Windows.Web.Http and XML HTTP Extended Request (IXMLHttpRequest2 and IXMLHttpRequest3) |
| WinINet | Windows.Web.Http and XML HTTP Extended Request (IXMLHttpRequest2 and IXMLHttpRequest3) |
| Winsock | Windows.Networking.Sockets |
Printing and documents
A subset of the printing and documents APIs is supported in a Windows Store app. For more info, see Win32 and COM (printing and documents).
When designing a Windows Store app, you'll want to provide the best printing experience:
Security
None of the existing security APIs are supported in a Windows Runtime app or UWP app. Here's some alternatives to the security APIs:
- Windows.Security.Credentials
- Windows.Security.Credentials.UI
- Windows.Security.Cryptography
- Windows.Security.Cryptography.Certificates
- Windows.Security.Cryptography.Core
- Windows.Security.Cryptography.DataProtection
Storage
Subsets of these storage APIs are at least partially supported in a Windows Runtime app or UWP app:
- Directory create, delete, and enumerate
- File mapping
For more info, see Win32 and COM (data).
Here's some alternatives to storage APIs that cannot be used in a Windows Runtime app or UWP app.
| Feature | Alternative |
|---|---|
| File copy, move, and replace | Windows.Storage.StorageFile |
| Directory create, delete, and enumerate | Windows.Storage.StorageFolder |
| IMAPI | none |
| Management (mount points, format, quotas) | none |
| Oplocks | none |
| Search | Windows.Storage.Search |
| USN journal | none |
System
Subsets of these system APIs are at least partially supported in a Windows Runtime app or UWP app:
- Heap API, thread local storage (TLS)
- Last error
- Synchronization
For more info, see Win32 and COM (system).
Here's some alternatives to system APIs that cannot be used in a Windows Runtime app or UWP app.
| Feature | Alternative |
|---|---|
| Console | none |
| Current directory | none |
| Fibers | none |
| Memory manager | Heap API |
| Named pipes | none |
| Power | |
| Registry | |
| Thread pool | Windows.System.Threading |
| Threads | Windows.System.Threading |
User interface
Subsets of these user interface APIs are at least partially supported in a Windows Runtime app or UWP app:
- National Language Support (NLS)
- Strsafe functions
- Text Services Framework (TSF)
- UI automation
- Windows Animation Manager
For more info, see Win32 and COM (user interface).
Here's some alternatives to user interface APIs that cannot be used in a Windows Runtime app or UWP app.
| Feature | Alternative |
|---|---|
| Common controls | HTML, XAML |
| DDE/NetDDE | none |
| DWM | none |
| File Open, File Save | |
| IMM | TSF |
| Magnifier | none |
| MSAA | UI automation |
| NLS | |
| RichEdit | HTML, XAML |
| Theming | HTML, CSS, XAML |
| Touch | Windows.UI.Input |
| User: carets | framework or app to draw |
| User: cursors | Windows.UI.Core.CoreCursor |
| User: clipboard | Windows.ApplicationModel.DataTransfer.Clipboard |
| User: controls | HTML, XAML |
| User: display | Windows.Graphics.Display |
| User: high DPI | apps are DPI aware |
| User: hooks | none |
| User: icons | apps represented by tiles |
| User: keyboard accel | Windows.UI.Core.CoreAcceleratorKeys |
| User: keyboard input | Windows.Devices.Input |
| User: MDI | none |
| User: messages | events and notifications |
| User: mouse input | Windows.Devices.Input |
| User: multimon | single monitor |
| User: SystemParametersInfo | Windows.Devices.Input |
| User: strings | strsafe functions |
| User: timers | none |
| User: shutdown | none |
| User: windowing | |
| Windows Animation Manager | Windows.UI.Core.AnimationMetrics |
| Windows Ribbon | HTML, XAML |
Related topics