EventKeywords EventKeywords EventKeywords EventKeywords Enum


定義套用至事件的標準關鍵字。Defines the standard keywords that apply to events.

此列舉具有 FlagsAttribute 個屬性允許以位元方式合併其成員值。

public enum class EventKeywords
public enum EventKeywords
type EventKeywords = 
Public Enum EventKeywords


All All All All -1

所有位元已設定為 1,表示事件的每種可能群組。All the bits are set to 1, representing every possible group of events.

AuditFailure AuditFailure AuditFailure AuditFailure 4503599627370496

已附加至所有失敗的安全性稽核事件。Attached to all failed security audit events. 使用這個僅適用於安全性記錄檔中的事件的關鍵字。Use this keyword only for events in the security log.

AuditSuccess AuditSuccess AuditSuccess AuditSuccess 9007199254740992

已附加至所有成功的安全性稽核事件。Attached to all successful security audit events. 使用這個僅適用於安全性記錄檔中的事件的關鍵字。Use this keyword only for events in the security log.

CorrelationHint CorrelationHint CorrelationHint CorrelationHint 4503599627370496

已附加至傳輸事件,其中相關活動 ID (相互關聯 ID) 是經過計算的值,而且不保證是唯一 (也就是說,不是真正的 GUID) 的值。Attached to transfer events where the related activity ID (correlation ID) is a computed value and is not guaranteed to be unique (that is, it is not a real GUID).

EventLogClassic EventLogClassic EventLogClassic EventLogClassic 36028797018963968

已附加至使用 RaiseEvent 函式引發的事件。Attached to events that are raised by using the RaiseEvent function.

MicrosoftTelemetry MicrosoftTelemetry MicrosoftTelemetry MicrosoftTelemetry 562949953421312

已附加至所有 Microsoft 遙測事件。Attached to all Microsoft telemetry events.

None None None None 0

發行事件時未執行關鍵字篩選。No filtering on keywords is performed when the event is published.

Sqm Sqm Sqm Sqm 2251799813685248

已附加至所有服務品質機制 (SQM) 事件。Attached to all Service Quality Mechanism (SQM) events.

WdiContext WdiContext WdiContext WdiContext 562949953421312

附加至所有 Windows 診斷基礎結構 (WDI) 內容事件。Attached to all Windows Diagnostics Infrastructure (WDI) context events.

WdiDiagnostic WdiDiagnostic WdiDiagnostic WdiDiagnostic 1125899906842624

附加至所有 Windows 診斷基礎結構 (WDI) 診斷事件。Attached to all Windows Diagnostics Infrastructure (WDI) diagnostic events.


下列範例示範如何使用EventKeywords類別重新定義事件的關鍵字。The following example shows how to use the EventKeywords class to redefine event keywords. 此程式碼範例是針對提供之較大範例的一部分EventSource類別。This code example is part of a larger example provided for the EventSource class.

public class Keywords
    public const EventKeywords Page = (EventKeywords)1;
    public const EventKeywords DataBase = (EventKeywords)2;
    public const EventKeywords Diagnostic = (EventKeywords)4;
    public const EventKeywords Perf = (EventKeywords)8;
Public Class Keywords
    Public Const Page As EventKeywords = CType(1, EventKeywords)
    Public Const DataBase As EventKeywords = CType(2, EventKeywords)
    Public Const Diagnostic As EventKeywords = CType(4, EventKeywords)
    Public Const Perf As EventKeywords = CType(8, EventKeywords)
End Class 'Keywords


您可以將不同的名稱指派給旗標,來自訂關鍵字的意義。You can customize the meaning of a keyword by assigning different names to the flags.