次の方法で共有


EventProvider での CaptureStateOnStart

記録の開始時にキャプチャされるイベントを記述するキーワードのコレクションを表します。 プロバイダーが有効になっている場合、ライブラリはその状態情報をログに記録するようプロバイダーに要求します。 Operation 属性を指定した場合、Keyword 要素をコレクションに設定または追加できます。

要素の階層

構文

<CaptureStateOnStart Operation = "Set" | "Add"> | “Remove”

  <!-- Child elements -->
  Keyword

</CaptureStateOnStart>

属性および要素

属性

属性 説明 データ型 必須 Default
操作 キーワードを設定するか、追加するかを示します。 この属性は、次のいずれかの値になります。
  • オン
  • 追加
  • 削除
いいえ オン

子要素

要素 説明 要件
Keyword (EventProvider 内) ユーザーモード プロバイダーの Windows イベント トレーシング (ETW) キーワードを記述します。 必須、1 つ以上。

親要素

要素 説明
EventProvider プロファイルのイベント プロバイダーを表します。
EventProviderId イベント プロバイダー識別子を表します。

次のコード例は、この要素の使用方法を示しています。

<EventProvider Id="sample-provider" Name="SampleProvider" NonPagedMemory="true" Level="5">
  <Keywords>
    <Keyword Value="0x98"/> <!-- Provider is enabled with these keywords throughout tracing session -->
  </Keywords>
  <CaptureStateOnStart>
    <Keyword Value="0xff4"/> <!-- Provider is  enabled with these keywords when tracing is started. -->
  </CaptureStateOnStart>
  <CaptureStateOnSave>
    <Keyword Value="0x118"/> <!-- Provider is enabled with these keywords when tracing is saved. -->
  </CaptureStateOnSave>
</EventProvider>

要素

CustomKeyword

CaptureStateOnSave