コード例 #1
0
        private void EtwRegister()
        {
            this.etwCallback = new System.Runtime.Interop.UnsafeNativeMethods.EtwEnableCallback(this.EtwEnableCallBack);
            uint num = System.Runtime.Interop.UnsafeNativeMethods.EventRegister(ref this.providerId, this.etwCallback, null, ref this.traceRegistrationHandle);

            if (num != 0)
            {
                throw new InvalidOperationException(SRCore.EtwRegistrationFailed(num.ToString("x", CultureInfo.CurrentCulture)));
            }
        }
 private void EtwRegister()
 {
     this.etwCallback = new System.Runtime.Interop.UnsafeNativeMethods.EtwEnableCallback(this.EtwEnableCallBack);
     uint num = System.Runtime.Interop.UnsafeNativeMethods.EventRegister(ref this.providerId, this.etwCallback, null, ref this.traceRegistrationHandle);
     if (num != 0)
     {
         throw new InvalidOperationException(SRCore.EtwRegistrationFailed(num.ToString("x", CultureInfo.CurrentCulture)));
     }
 }