internal static EtwHandle RegisterTraceGuids(EtwTraceCallback cbFunc, Guid controlGuid, TraceGuidRegistration registration)
 {
     ulong regHandle = 0L;
     uint num2 = EtwNativeMethods.RegisterTraceGuids(cbFunc, null, ref controlGuid, 1, ref registration, null, null, out regHandle);
     if (num2 != 0)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int) num2));
     }
     return new EtwHandle(regHandle);
 }
 private unsafe void Initialize(Guid ctlGuid, Guid evtClassGuid)
 {
     this.controlGuid = ctlGuid;
     this.eventClassGuid = evtClassGuid;
     TraceGuidRegistration registration = new TraceGuidRegistration();
     this.etwProc = new EtwTraceCallback(this.EtwNotificationCallback);
     registration.Guid = &evtClassGuid;
     registration.RegHandle = null;
     this.registrationHandle = EtwHandle.RegisterTraceGuids(this.etwProc, this.controlGuid, registration);
 }
        private unsafe void Initialize(Guid ctlGuid, Guid evtClassGuid)
        {
            this.controlGuid    = ctlGuid;
            this.eventClassGuid = evtClassGuid;
            TraceGuidRegistration registration = new TraceGuidRegistration();

            this.etwProc            = new EtwTraceCallback(this.EtwNotificationCallback);
            registration.Guid       = &evtClassGuid;
            registration.RegHandle  = null;
            this.registrationHandle = EtwHandle.RegisterTraceGuids(this.etwProc, this.controlGuid, registration);
        }
 internal static extern unsafe uint RegisterTraceGuids([In] EtwTraceCallback cbFunc, [In] void* context, [In] ref Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle);
Example #5
0
 internal static extern unsafe uint RegisterTraceGuids([In] EtwTraceCallback cbFunc, [In] void *context, [In] ref Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle);
        internal static EtwHandle RegisterTraceGuids(EtwTraceCallback cbFunc, Guid controlGuid, TraceGuidRegistration registration)
        {
            ulong regHandle = 0L;
            uint  num2      = EtwNativeMethods.RegisterTraceGuids(cbFunc, null, ref controlGuid, 1, ref registration, null, null, out regHandle);

            if (num2 != 0)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)num2));
            }
            return(new EtwHandle(regHandle));
        }