Shared\MS\Utility\TraceProvider.cs (17)
429private static ClassicEtw.ControlCallback _etwProc; // Trace Callback function
447ClassicEtw.TRACE_GUID_REGISTRATION guidReg;
455_etwProc = new ClassicEtw.ControlCallback(EtwEnableCallback);
461ClassicEtw.RegisterTraceGuidsW(_etwProc, IntPtr.Zero, ref providerGuid, 1, ref guidReg, null, null, out registrationHandle);
472private unsafe uint EtwEnableCallback(ClassicEtw.WMIDPREQUESTCODE requestCode, IntPtr context, IntPtr bufferSize, ClassicEtw.WNODE_HEADER* buffer)
478case ClassicEtw.WMIDPREQUESTCODE.EnableEvents:
480_keywords = (EventTrace.Keyword)ClassicEtw.GetTraceEnableFlags((ulong)buffer->HistoricalContext);
481_level = (EventTrace.Level)ClassicEtw.GetTraceEnableLevel((ulong)buffer->HistoricalContext);
484case ClassicEtw.WMIDPREQUESTCODE.DisableEvents:
519ClassicEtw.UnregisterTraceGuids(_registrationHandle.Value);
526ClassicEtw.EVENT_HEADER header;
528header.Header.Flags = ClassicEtw.WNODE_FLAG_TRACED_GUID | ClassicEtw.WNODE_FLAG_USE_MOF_PTR;
536if (argc > ClassicEtw.MAX_MOF_FIELDS)
539argc = ClassicEtw.MAX_MOF_FIELDS;
549return ClassicEtw.TraceEvent(_traceHandle, &header);