ComponentRenewal Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Memungkinkan aplikasi untuk memulai pembaruan komponen yang perlu diperbarui untuk memutar konten media yang dilindungi.
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
- Warisan
- Atribut
Persyaratan Windows
Rangkaian perangkat |
Windows Desktop Extension SDK (diperkenalkan dalam 10.0.10240.0)
|
API contract |
Windows.Media.Protection.ProtectionRenewalContract (diperkenalkan dalam v1.0)
|
Contoh
Contoh ini menunjukkan ComponentLoadFailedEventHandler. Perulangan berulang melalui komponen yang gagal. Dan RenewSystemComponentsAsync dipanggil. Perhatikan bahwa RevocationAndRenewalInformation diteruskan melalui 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);
}
Metode
RenewSystemComponentsAsync(RevocationAndRenewalInformation) |
Memulai pembaruan komponen perlindungan konten penting setelah meminta pengguna. |