AppInstallManager.GetIsAppAllowedToInstallForUserAsync 方法

定义

使用 生成遥测数据的选项,确定指定应用是否有权在当前计算机或设备上安装指定用户。

public:
 virtual IAsyncOperation<bool> ^ GetIsAppAllowedToInstallForUserAsync(User ^ user, Platform::String ^ productId, Platform::String ^ skuId, Platform::String ^ catalogId, Platform::String ^ correlationVector) = GetIsAppAllowedToInstallForUserAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> GetIsAppAllowedToInstallForUserAsync(User const& user, winrt::hstring const& productId, winrt::hstring const& skuId, winrt::hstring const& catalogId, winrt::hstring const& correlationVector);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> GetIsAppAllowedToInstallForUserAsync(User user, string productId, string skuId, string catalogId, string correlationVector);
function getIsAppAllowedToInstallForUserAsync(user, productId, skuId, catalogId, correlationVector)
Public Function GetIsAppAllowedToInstallForUserAsync (user As User, productId As String, skuId As String, catalogId As String, correlationVector As String) As IAsyncOperation(Of Boolean)

参数

user
User

一个 对象,标识要为此操作指定的用户。

productId
String

Platform::String

winrt::hstring

此方法将检查的应用的产品 ID,以确定其是否具有安装权限。

skuId
String

Platform::String

winrt::hstring

此方法将检查的应用的 SKU ID,以确定其是否具有安装权限。

catalogId
String

Platform::String

winrt::hstring

此方法将检查的应用的目录 ID,以确定其是否具有安装权限。

correlationVector
String

Platform::String

winrt::hstring

可用于生成遥测数据的关联向量字符串。

返回

如果应用具有安装权限,则成功完成后返回 true 的异步操作;否则为 false。

属性

Windows 要求

要求 说明
设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)
应用功能
runFullTrust

适用于