EventDescriptor Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the metadata that defines an event.
public value class EventDescriptor
public struct EventDescriptor
type EventDescriptor = struct
Public Structure EventDescriptor
- Inheritance
Remarks
This class represents an event defined in the manifest. After writing your manifest, you use the Message Compiler (MC.exe) to generate a resource file. A byproduct of the process is a header file that contains the event descriptor in C, as shown in the following example.
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ReadEvent = {0x1, 0x0, 0x10, 0x4, 0x0, 0x0, 0x8000000000000005};
Use the values of the descriptor to create an instance of this class, as shown in the following example. The keyword is an unsigned long value and cannot be cast directly to a long; you must use the unchecked
language keyword to allow the assignment.
unchecked
{
readEvent = new EventDescriptor(0x1, 0x0, 0x10, 0x4, 0x0, 0x0, (long)0x8000000000000005);
}
You use the descriptor when calling the EventProvider.WriteEvent or EventProvider.WriteEvent method.
Constructors
EventDescriptor(Int32, Byte, Byte, Byte, Byte, Int32, Int64) |
Initializes a new instance of the EventDescriptor class. |
Properties
Channel |
Retrieves the channel value from the event descriptor. |
EventId |
Retrieves the event identifier value from the event descriptor. |
Keywords |
Retrieves the keyword value from the event descriptor. |
Level |
Retrieves the level value from the event descriptor. |
Opcode |
Retrieves the operation code value from the event descriptor. |
Task |
Retrieves the task value from the event descriptor. |
Version |
Retrieves the version value from the event descriptor. |
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈