Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newyear2006/55999bffce3316269f864287e324ee5c to your computer and use it in GitHub Desktop.
Save newyear2006/55999bffce3316269f864287e324ee5c to your computer and use it in GitHub Desktop.
UWP ApiFeatures per Powershell abfragen
# zunächst brauchen wir eine Windows Runtime Referenz
Add-Type -AssemblyName System.Runtime.WindowsRuntime
# dann die passende API-Laden, https://docs.microsoft.com/en-us/uwp/api/windows.foundation.metadata.apiinformation
[Windows.Foundation.Metadata.ApiInformation,Windows.Foundation.UniversalAPIContract,ContentType=WindowsRuntime]
# Featureabfrage
[Windows.Foundation.Metadata.ApiInformation]::IsTypePresent("Windows.Media.Playlists.Playlist")
# oder API-Contract mit Version
[Windows.Foundation.Metadata.ApiInformation]::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 1,0)
# bisher bekannte API-Contracts: https://docs.microsoft.com/en-us/uwp/extension-sdks/windows-universal-sdk
# genauer: https://docs.microsoft.com/en-us/uwp/extension-sdks/
# Windows UWP Namespaces: https://docs.microsoft.com/de-de/uwp/api/
# hier noch ein Blogeitnrag zur Feature-Detection: https://blogs.windows.com/buildingapps/2015/09/15/dynamically-detecting-features-with-api-contracts-10-by-10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment