isp*_*iro 1 c# windows-store-apps win-universal-app uwp desktop-bridge
我添加了以下行:
FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
Run Code Online (Sandbox Code Playgroud)
但我希望能够检查这是否有效(最好没有try-catch块).有没有办法测试桌面扩展是否存在?
建议的方法是:
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
Run Code Online (Sandbox Code Playgroud)