1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
7 #if ES_BUILD_STANDALONE
8 namespace Microsoft.Diagnostics.Tracing
10 namespace System.Diagnostics.Tracing
13 // Represents the interface between EventProvider and an external logging mechanism.
14 internal interface IEventProvider
16 // Register an event provider.
17 unsafe uint EventRegister(
19 UnsafeNativeMethods.ManifestEtw.EtwEnableCallback enableCallback,
20 void* callbackContext,
21 ref long registrationHandle);
23 // Unregister an event provider.
24 uint EventUnregister(long registrationHandle);
27 unsafe int EventWriteTransferWrapper(
28 long registrationHandle,
29 ref EventDescriptor eventDescriptor,
31 Guid* relatedActivityId,
33 EventProvider.EventData* userData);
35 // Get or set the per-thread activity ID.
36 int EventActivityIdControl(UnsafeNativeMethods.ManifestEtw.ActivityControl ControlCode, ref Guid ActivityId);