Share via


ComponentRenewal Class

Definition

Enables applications to initiate renewal of components which need updating in order to play protected media content.

public ref class ComponentRenewal abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Media.Protection.ProtectionRenewalContract, 65536)]
class ComponentRenewal final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Media.Protection.ProtectionRenewalContract), 65536)]
public static class ComponentRenewal
Public Class ComponentRenewal
Inheritance
Object Platform::Object IInspectable ComponentRenewal
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Media.Protection.ProtectionRenewalContract (introduced in v1.0)

Examples

This example shows a ComponentLoadFailedEventHandler. A loop iterates through the failed components. And RenewSystemComponentsAsync is invoked. Note that the RevocationAndRenewalInformation is passed in through the ComponentLoadFailedEventArgs.

private async void Manager_ComponentLoadFailed(MediaProtectionManager sender, ComponentLoadFailedEventArgs e)
{
    for (var i = 0; i < e.Information.Items.Count; i++)
    {
        Debug.WriteLine('Component Name=' +
                    e.Information.Items[i].Name +
                    "<BR/>");
        Debug.WriteLine('Failure Reason=' +
                    e.Information.Items[i].Reasons.ToString(16) +
                    "<BR/>");
        Debug.WriteLine('Renewal GUID=' +
                    e.Information.Items[i].RenewalId +
                    "<BR/>");
    }



    //  Invoke the revocation               
    var renewalStatus = await ComponentRenewal.RenewSystemComponentsAsync(e.Information);
    Debug.WriteLine("RenewSystemComponentsAsync: " +
                    renewalStatus.ToString() +
                    "<BR/>");

    e.Completion.Complete(false);
}

Methods

RenewSystemComponentsAsync(RevocationAndRenewalInformation)

Initiates updating of critical content protection components after prompting the user.

Applies to