Share via


StoreContext.CanAcquireStoreLicenseForOptionalPackageAsync(Package) Method

Definition

Gets a value that indicates whether a license can be acquired for the specified downloadable content (DLC) package of the current app for the current user.

public:
 virtual IAsyncOperation<StoreCanAcquireLicenseResult ^> ^ CanAcquireStoreLicenseForOptionalPackageAsync(Package ^ optionalPackage) = CanAcquireStoreLicenseForOptionalPackageAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreCanAcquireLicenseResult> CanAcquireStoreLicenseForOptionalPackageAsync(Package const& optionalPackage);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreCanAcquireLicenseResult> CanAcquireStoreLicenseForOptionalPackageAsync(Package optionalPackage);
function canAcquireStoreLicenseForOptionalPackageAsync(optionalPackage)
Public Function CanAcquireStoreLicenseForOptionalPackageAsync (optionalPackage As Package) As IAsyncOperation(Of StoreCanAcquireLicenseResult)

Parameters

optionalPackage
Package

The DLC package to check.

Returns

An asynchronous operation that, on successful completion, returns a StoreCanAcquireLicenseResult object that indicates whether the license can be acquired.

Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Services.Store.StoreContract (introduced in v3.0)

Remarks

Note

Downloadable content (DLC) packages are not available to all developer accounts.

Applies to

See also