瞭解 Windows API 的哪些功能可在通用 Windows 平臺 (UWP) 應用程式中使用,以及哪些 api 做為無法使用的替代方案。
應用程式安裝
UWP 應用程式不支援任何現有的應用程式安裝 Api。 以下是應用程式安裝 Api 的一些替代方案:
裝置
UWP 應用程式支援裝置 Api 的子集。
針對無法在 UWP 應用程式中使用的裝置 Api,以下是一些替代方案。
| 功能 | 替代函式 |
|---|---|
| 藍牙 | Windows.Devices.Bluetooth |
| 裝置列舉 (函式探索、PnP X、WSD) | Windows.Devices.Enumeration |
| 傳真 | 無 |
| 位置 API | Windows。裝置。地理位置 |
| 列印 | Windows。圖形:列印 |
| 3D 列印 | Windows。Printing3D |
| 感應器 | Windows.Devices.Sensors |
| 串列和平行埠 | Windows.Devices.SerialCommunication |
| sms | Windows.Devices.Sms |
| UPnP | Windows.Devices.Enumeration.Pnp |
| Windows 可攜式裝置 | Windows.Devices.Portable |
| WSD | Windows.Devices.Enumeration |
| 電池 |
Windows.Devices.Power Windows。系統. 電源 |
圖形
UWP 應用程式中至少部分支援這些圖形 Api 的子集:
- Direct2D
- Direct3D 11
- DirectWrite
- DirectXMath
- DXGI
- WIC
以下是一些替代方案:
多媒體
UWP 應用程式中至少部分支援這些多媒體 Api 的子集:
- 核心音訊
- 媒體播放
- 媒體基礎
- Windows 音訊會話 API (WASAPI)
如需適用于 UWP 應用程式之 API 的詳細資訊,請參閱 音訊、影片和相機
網路
UWP 應用程式中至少部分支援這些網路 Api 的子集:
- DHCP
- 行動寬頻
- RPC
- Windows 通訊端 (Winsock)
- Windows Web 服務
以下是無法在 UWP 應用程式中使用之網路 Api 的一些替代方案。
| 功能 | 替代函式 |
|---|---|
| BITS | Windows.Networking.BackgroundTransfer |
| EAP | 無 |
| 防火牆 | 無 |
| HTTP 伺服器 | 無 |
| IP 協助程式 | Windows.Networking.Connectivity |
| NDF | 無 |
| NLM | Windows.Networking.Connectivity |
| P2P | 無 |
| QOS | Windows。網路功能通訊端 |
| RAS | 無 |
| SNMP | 無 |
| TAPI | 無 |
| WinHTTP | Windows.Web.Http |
| WinINet | Windows.Web.Http |
| Winsock | Windows。網路功能通訊端 |
列印和檔
UWP 應用程式支援列印和檔 Api 的子集。
設計 UWP 應用程式時,您會想要提供最佳的列印體驗:
安全性
UWP 應用程式不支援任何現有的安全性 Api。 以下是安全性 Api 的一些替代方案:
- Windows。安全性。認證
- Windows.Security.Credentials.UI
- Windows.Security.Cryptography
- Windows。安全性加密憑證
- Windows.Security.Cryptography.Core
- Windows.Security.Cryptography.DataProtection
儲存體
UWP 應用程式中至少部分支援這些儲存體 Api 的子集:
- 建立、刪除和列舉目錄
- 檔案對應
以下是無法在 UWP 應用程式中使用的 Win32 儲存體 Api 的一些替代方案。
| 功能 | 替代函式 |
|---|---|
| 檔案複製、移動和取代 | Windows.Storage.StorageFile |
| 建立、刪除和列舉目錄 | Windows.Storage.StorageFolder |
| IMAPI.EXE | 無 |
| 管理 (掛接點、格式、配額) | 無 |
| Oplock | 無 |
| 搜尋 | Windows。儲存體。搜索 |
| USN 日誌 | 無 |
系統
UWP 應用程式中至少部分支援這些系統 Api 的子集:
- 堆積 API、執行緒區域儲存 (TLS)
- 上次錯誤
- 同步處理
以下是無法在 UWP 應用程式中使用之系統 Api 的一些替代方案。
| 功能 | 替代函式 |
|---|---|
| 主控台 | 建立 UWP 主控台應用程式 |
| 目前的目錄 | 無 |
| 纖維 | 無 |
| 記憶體管理員 | 堆積 API |
| 具名管道 | 處理序間通訊 |
| 電源 |
Windows.Devices.Power Windows。系統. 電源 Windows。系統電源診斷 |
| 登錄 |
Windows.Storage.ApplicationDataContainer Windows.Storage.ApplicationDataContainerSettings |
| 執行緒集區 | Windows.System.Threading |
| 執行緒 | Windows.System.Threading |
使用者介面
UWP 應用程式中至少部分支援這些使用者介面 Api 的子集:
- (NLS 的國家語言支援)
- >Strsafe.h 函式
- Text Services Framework (TSF)
- UI 自動化
- Windows 動畫管理員
以下是無法在 UWP 應用程式中使用的使用者介面 Api 的一些替代方案。
| 功能 | 替代函式 |
|---|---|
| 通用控制項 | HTML、XAML |
| DDE/NetDDE | 無 |
| DWM | Windows.UI.Composition |
| 開啟檔案、儲存檔案 |
Windows.Storage.Pickers.FileOpenPicker Windows.Storage.Pickers.FileSavePicker |
| IMM | TSF |
| 放大鏡 | 無 |
| MSAA | UI 自動化 |
| NLS |
Windows.Globalization Windows.Globalization.DateTimeFormatting Windows.Globalization.NumberFormatting |
| RichEdit | HTML、XAML |
| 佈景主題 | HTML、CSS、XAML |
| 觸控 | Windows.UI.Input |
| 使用者:游標 | 要繪製的架構或應用程式 |
| 使用者:資料指標 | Windows。UI。Core. CoreCursor |
| 使用者:剪貼簿 | Windows。ApplicationModel. DataTransfer 剪貼簿 |
| 使用者:控制項 | HTML、XAML |
| 使用者:顯示 | Windows。圖形。顯示 |
| 使用者:高 DPI | 應用程式為 DPI 感知 |
| 使用者:攔截 | 無 |
| 使用者:圖示 | 磚所代表的應用程式 |
| 使用者:鍵盤 accel | Windows。UI。Core. CoreAcceleratorKeys |
| 使用者:鍵盤輸入 | Windows.Devices.Input |
| 使用者: MDI | TABVIEW XAML 控制項, AppWindow |
| 使用者:訊息 | 事件和通知 |
| 使用者:滑鼠輸入 | Windows.Devices.Input |
| 使用者: multimon | 單一監視 |
| 使用者: SystemParametersInfo | Windows.Devices.Input |
| 使用者:字串 | >strsafe.h 函式 |
| 使用者:計時器 | 無 |
| 使用者:關機 | 無 |
| 使用者:視窗化 |
Windows.UI.Core.CoreWindow Windows。UI。Core. CoreWindowDialog Windows。UI。Core. CoreWindowFlyout |
| Windows 動畫管理員 | Windows.UI.Core.AnimationMetrics |
| Windows 功能區 | HTML、XAML |