EventSource::WriteEventWithRelatedActivityIdCore Method (Int32, Guid*, Int32, EventSource::EventData*)
[Supported in the .NET Framework 4.5.1 and later versions]
Writes an event that indicates that the current activity is related to another activity.
This API is not CLS-compliant.
Assembly: mscorlib (in mscorlib.dll)
protected: [SecurityCriticalAttribute] [CLSCompliantAttribute(false)] void WriteEventWithRelatedActivityIdCore( int eventId, Guid* relatedActivityId, int eventDataCount, EventSource::EventData* data )
Parameters
- eventId
-
Type:
System::Int32
An identifier that uniquely identifies this event within the EventSource.
- relatedActivityId
-
Type:
System::Guid*
A pointer to the GUID of the related activity ID.
- eventDataCount
-
Type:
System::Int32
The number of items in the data field.
- data
-
Type:
System.Diagnostics.Tracing::EventSource::EventData*
A pointer to the first item in the event data field.
WriteEventWithRelatedActivityIdCore is similar to the WriteEventWithRelatedActivityId method but offers better performance, bevcause it does not have to unbox the childActivityID and data arguments.
Your ETW event method calling this function must follow these guidelines:
Specify the first parameter as a Guid named relatedActivityId.
Specify either Send or Receive as the EventAttribute::Opcode property.
Call WriteEventWithRelatedActivityIdCore passing in the event ID, followed by the related ID GUID, followed by all the parameters the event method is passed, in the same order.
Available since 8.1
.NET Framework
Available since 4.5.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1