Event class
The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To see the documentation for these versions, set the Visual Studio Version selector control for this article to Visual Studio 2017 or later. It's found at the top of the table of contents on this page.
The Event
class is used with the MatchEvent, MatchEventInMemberFunction, MatchEventStack, and MatchEventStackInMemberFunction functions. Use it to match any event.
Syntax
class Event
{
public:
Event(const RawEvent& event);
const unsigned short& EventId() const;
const unsigned long long& EventInstanceId() const;
const long long& TickFrequency() const;
const long long& Timestamp() const;
const unsigned long& ProcessId() const;
const unsigned long& ThreadId() const;
const unsigned short& ProcessorIndex() const;
const char* EventName() const;
const wchar_t* EventWideName() const;
};
Members
Constructors
Functions
Data
EventId
EventInstanceId
EventName
EventWideName
ProcessId
ProcessorIndex
ThreadId
TickFrequency
Timestamp
Event
Event(const RawEvent& event);
Parameters
event
Any event.
Data
const void* Data() const;
Return Value
A pointer to extra data contained in this event. For more information on how to interpret this field, see EVENT_DATA.
EventId
const unsigned short& EventId() const;
Return Value
A number that identifies the event type. For a list of event identifiers, see EVENT_ID.
EventInstanceId
const unsigned long long& EventInstanceId() const;
Return Value
A number that uniquely identifies the event inside a trace. This value doesn't change when analyzing or relogging the same trace multiple times. Use this value to identify the same event in multiple analysis or relogging passes over the same trace.
EventName
const char* EventName() const;
Return Value
An ANSI string containing the name of the event type identified by EventId.
EventWideName
const wchar_t* EventWideName() const;
Return Value
A wide string containing the name of the event identified by EventId.
ProcessId
const unsigned long& ProcessId() const;
Return Value
The identifier for the process in which the event occurred.
ProcessorIndex
const unsigned short& ProcessorIndex() const;
Return Value
The zero-based index for the logical processor on which the event occurred.
ThreadId
const unsigned long& ThreadId() const;
Return Value
The identifier for the thread in which the event occurred.
TickFrequency
const long long& TickFrequency() const;
Return Value
The number of ticks per second to use when evaluating a duration measured in ticks for this event.
Timestamp
const long long& Timestamp() const;
Return Value
If the event is an activity, this function returns a tick value captured at the time the activity started. For a simple event, this function returns a tick value captured at the time the event occurred.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for