Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.79 KB

revocationandrenewalinformation.md

File metadata and controls

51 lines (38 loc) · 1.79 KB
-api-id -api-type
T:Windows.Media.Protection.RevocationAndRenewalInformation
winrt class

Windows.Media.Protection.RevocationAndRenewalInformation

-description

Contains information about components that need to be revoked and renewed.

-remarks

An instance of this object is returned by the ComponentLoadFailedEventArgs.Information property.

-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);
}

-see-also