表示關鍵字集合,描述儲存追蹤時要擷取的事件。 程式庫會要求提供者在儲存收集器時記錄其狀態資訊。 如果指定 Operation 屬性,則可以將 Keyword 元素設定或新增至集合。
元素階層
Syntax
<CaptureStateOnSave Operation = "Set" | "Add"> | “Remove”
<!-- Child elements -->
Keyword
</CaptureStateOnSave>
屬性和項目
屬性
| 屬性 |
描述 |
資料類型 |
必要 |
預設 |
|
運算 |
指出是否應該設定或新增關鍵字。 |
此屬性可以有下列其中一個值: |
No |
集合 |
子元素
父項目
範例
下列程式碼範例示範如何使用這個專案。
<EventProvider Id="EventProvider_DWMWin32k_CaptureState" Name="e7ef96be-969f-414f-97d7-3ddb7b558ccc" NonPagedMemory="true" CaptureStateOnly="true" >
<!-- CaptureStateOnly="true" means provider is not enabled throughout the tracing session. -->
<CaptureStateOnSave>
<Keyword Value="0x80000"/> <!-- Provider is enabled with these keywords when tracing is saved. -->
</CaptureStateOnSave>
</EventProvider>
元素
CustomKeyword
CaptureStateOnStart
EventProvider) 中的 CaptureStateOnDemand (