IDownloadableContentPackage.CheckLicense Method

Checks the license for the package.

Syntax

public:
bool CheckLicense(
         out bool isTrial
)  

Parameters

isTrial
Type: bool 

 The flag is true if the package is a trial version.

Return value

Type: bool 

 The flag is true if the license has been accepted.

Remarks

This API assumes there actually is a valid license to check. Wrap this call in a try/catch to handle cases where the license might actually no longer be present e.g. when the purchasing user has signed out and the console is not set to Home Xbox. The system should inform the user of loss of license scenarios for the game, but the try/catch is to prevent the title from crashing in the background in case the user recovers by signing back in.

Requirements

Namespace: Windows.Xbox.Management.Deployment

Metadata: windows.winmd

See also

Reference

IDownloadableContentPackage Interface

IDownloadableContentPackage Members

Windows.Xbox.Management.Deployment Namespace