ComponentLoadFailedEventArgs 类

定义

包含二进制数据加载失败时 MediaProtectionManager 对象的事件数据。

public ref class ComponentLoadFailedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ComponentLoadFailedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ComponentLoadFailedEventArgs
Public NotInheritable Class ComponentLoadFailedEventArgs
继承
Object Platform::Object IInspectable ComponentLoadFailedEventArgs
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

以下示例演示如何创建 MediaProtectionManager、设置 Properties 属性,以及为 ComponentLoadFailedServiceRequested 添加事件侦听器。 有关完整示例,请参阅 如何使用可插入 DRM 主题。 '''javascript

mediaProtectionManager = 新的 Windows.Media.Protection.MediaProtectionManager () ;

function ServiceRequested (e) { logMsg (“Got Enabler - system/type: {” + e.request.protectionSystem + “}/{” + e.request.type + “}”) ;e.completion.complete (true) ;}

function ComponentLoadFailed (e) { logMsg (e.information.items.size.toString () + “failed components”) ; logMsg (”

组件:

");

列出 (var i = 0 的故障组件;i.information.items.size < ; i++) { logMsg (”

“ + e.information.items[i].name + ”

" + "

Reasons=0x“ + e.information.items[i].reasons.toString (16) + ”

Renewal Id=“ + e.information.items[i].renewalId) ;}

e.completion.complete (false) ;}

function RebootNeeded (e) { logMsg (“Reboot Required”) ; }

mediaProtectionManager.addEventListener (“servicerequested”, ServiceRequested, false) ;mediaProtectionManager.addEventListener (“componentloadfailed”, ComponentLoadFailed, false) ;mediaProtectionManager.addEventListener (“rebootneeded”, RebootNeeded, false) ;

注解

此对象不直接实例化。 它由 MediaProtectionManager.ComponentLoadFailed 事件创建,作为参数返回到 ComponentLoadFailedEventHandler 委托。

属性

Completion

返回事件完成的指示。

Information

返回 RevocationAndRenewalInformation 对象中需要使用更新的组件撤销和续订的组件列表。

适用于