Alternatives to Windows APIs in Windows Runtime apps

Applies to Windows and Windows Phone

Learn which features of the Windows API can be used in a Windows Runtime 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 for Windows Runtime apps.

App installation

None of the existing app installation APIs are supported in a Windows Runtime app. Here's some alternatives to the app installation APIs:

Devices

A subset of the device APIs is supported in a Windows Runtime app. For more info, see Win32 and COM for Windows Runtime apps (devices).

For device APIs that can't be used in a Windows Runtime app, here are some alternatives.

FeatureAlternative
Bluetooth Windows.Networking.Proximity
Device enumeration (Function Discovery, PnP-X, WSD) Windows.Devices.Enumeration
FAXnone
Location API Windows.Devices.Geolocation
Print Windows.Graphics.Printing
Sensors Windows.Devices.Sensors
Serial and parallel portsnone
SMS Windows.Devices.Sms
UPnP Windows.Devices.Enumeration.Pnp
Windows Portable Devices Windows.Devices.Portable
WSD Windows.Devices.Enumeration

 

Graphics

Subsets of these graphics APIs are at least partially supported in a Windows Runtime app:

  • Direct2D
  • Direct3D 11
  • DirectWrite
  • DirectXMath
  • DXGI
  • WIC

For more info, see Win32 and COM for Windows Runtime apps (graphics).

When designing a Windows Runtime app, you'll likely want to use HTML5 or XAML to display graphics. For more info, see:

Multimedia

Subsets of these multimedia APIs are at least partially supported in a Windows Runtime app:

  • Core audio
  • Media Playback
  • Media Foundation
  • Windows Audio Session API (WASAPI)

For more info, see Win32 and COM for Windows Runtime apps (multimedia).

When designing a Windows Runtime 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:

  • DHCP
  • Mobile Broadband
  • RPC
  • Windows Web Services

For more info, see Win32 and COM for Windows Runtime apps (networking).

Here's some alternatives to networking APIs that can't be used in a Windows Runtime app.

FeatureAlternative
BITS Windows.Networking.BackgroundTransfer
EAPnone
Firewallnone
HTTP servernone
IP Helper Windows.Networking.Connectivity
NDFnone
NLM Windows.Networking.Connectivity
P2Pnone
QOS Windows.Networking.Sockets
RASnone
SNMPnone
TAPInone
WinHTTP Windows.Web.Http and XML HTTP Extended Request (IXMLHttpRequest2)
WinINet Windows.Web.Http and XML HTTP Extended Request (IXMLHttpRequest2)
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 for Windows Store apps (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. 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:

  • Directory create, delete, and enumerate
  • File mapping

For more info, see Win32 and COM for Windows Runtime apps (data).

Here's some alternatives to storage APIs that can't be used in a Windows Runtime app.

FeatureAlternative
File copy, move, and replace Windows.Storage.StorageFile
Directory create, delete, and enumerate Windows.Storage.StorageFolder
IMAPInone
Management (mount points, format, quotas)none
Oplocksnone
Search Windows.Storage.Search
USN journalnone

 

System

Subsets of these system APIs are at least partially supported in a Windows Runtime app:

  • Heap API, thread local storage (TLS)
  • Last error
  • Synchronization

For more info, see Win32 and COM for Windows Runtime apps (system).

Here's some alternatives to system APIs that can't be used in a Windows Runtime app.

FeatureAlternative
Consolenone
Current directorynone
Fibersnone
Memory managerHeap API
Named pipesnone
Powernone
Registry
Windows.Storage.ApplicationDataContainer
Windows.Storage.ApplicationDataContainerSettings
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:

  • National Language Support (NLS)
  • Strsafe functions
  • Text Services Framework (TSF)
  • UI automation
  • Windows Animation Manager

For more info, see Win32 and COM for Windows Runtime apps (user interface).

Here's some alternatives to user interface APIs that can't be used in a Windows Runtime app.

FeatureAlternative
Common controlsHTML, XAML
DDE/NetDDEnone
DWMnone
File Open, File Save
Windows.Storage.Pickers.FileOpenPicker
Windows.Storage.Pickers.FileSavePicker
IMMTSF
Magnifiernone
MSAAUI automation
NLS
Windows.Globalization
Windows.Globalization.DateTimeFormatting
Windows.Globalization.NumberFormatting
RichEditHTML, XAML
ThemingHTML, CSS, XAML
Touch Windows.UI.Input
User: caretsframework or app to draw
User: cursors Windows.UI.Core.CoreCursor
User: clipboard Windows.ApplicationModel.DataTransfer.Clipboard
User: controlsHTML, XAML
User: display Windows.Graphics.Display
User: high DPIapps are DPI aware
User: hooksnone
User: iconsapps represented by tiles
User: keyboard accel Windows.UI.Core.CoreAcceleratorKeys
User: keyboard input Windows.Devices.Input
User: MDInone
User: messagesevents and notifications
User: mouse input Windows.Devices.Input
User: multimonsingle monitor
User: SystemParametersInfo Windows.Devices.Input
User: stringsstrsafe functions
User: timersnone
User: shutdownnone
User: windowing
Windows.UI.Core.CoreWindow
Windows.UI.Core.CoreWindowDialog
Windows.UI.Core.CoreWindowFlyout
Windows Animation Manager Windows.UI.Core.AnimationMetrics
Windows RibbonHTML, XAML

 

Related topics

API reference for Windows Runtime apps
Win32 and COM for Windows Runtime apps (networking)

 

 

Show:
© 2014 Microsoft