微軟使UWP API可用於Win32應用程序
昨天晚些時候,微軟宣布即將對UWP API進行更改,這些更改消除了在非“ UWP”應用程序中使用UWP API的諸多限制,使API更易於使用,並去掉了使用UWP API的應用程序必須在微軟商店當中上架的規定。這些更改將在Windows 10 build 19000及更高版本中可用。
到目前為止,使用UWP API的編程模型,要求使用這些接口編寫的任何應用都遵循一些規則,如需要包或應用程序標識來標識調用方,需要標識來限定數據和資源的範圍,在應用程序部署期間需要配置計算機狀態,並由包或應用程序標識索引等等。
但是,現在微軟正在放鬆這些要求,這意味著開發人員現在可以通過設置一些新配置,在Win32應用程序中使用UWP API。
![3330fc8429bf64958dfdf5cebbc57c8f.png](https://i0.wp.com/static.cnbetacdn.com/article/2019/1031/200a635a4abc7d6.png?w=640&ssl=1)
![226480d4b154aa61089e8a6a4fb1c8b9.png](https://i0.wp.com/static.cnbetacdn.com/article/2019/1031/b0fcba10f62ff0b.png?w=640&ssl=1)
![ae9ac93e84b9876235006bd1401819dd.png](https://i0.wp.com/static.cnbetacdn.com/article/2019/1031/3e0662716397e0c.png?w=640&ssl=1)
![6b72d4db1d4f404242ec1eee1081651a.png](https://i0.wp.com/static.cnbetacdn.com/thumb/article/2019/1031/8d006e1fdaa98f6.png?w=640&ssl=1)
![9fa47d6b7adc6e58d04e344ad21f4331.png](https://i0.wp.com/static.cnbetacdn.com/article/2019/1031/7912eccddf72f85.png?w=640&ssl=1)
![227f85b6faa3293c88598c3ceb04c4b8.png](https://i0.wp.com/static.cnbetacdn.com/thumb/article/2019/1031/dff0373cf30d332.png?w=640&ssl=1)
![d2e272936e4486373907d58ed2177685.png](https://i0.wp.com/static.cnbetacdn.com/thumb/article/2019/1031/236977d0fb05995.png?w=640&ssl=1)
微軟目前已經發布瞭如何使用這些新配置的信息,Win32開發人員可以查看相關文檔進行了解。對於一般用戶來說,這意味著之前僅適用於微軟商店當中應用程序的某些功能,現在開始提供給所有種類的Windows應用程序使用,例如通知,後台任務和共享等功能。微軟已經表示,它繼續投資於UWP API,朝著消除這些功能限制繼續前進。