private unsafe void EtwRegister() { uint status; _etwCallback = new UnsafeNativeMethods.EtwEnableCallback(EtwEnableCallBack); status = UnsafeNativeMethods.EventRegister(ref _providerId, _etwCallback, null, ref _regHandle); if (status != 0) { throw new Win32Exception((int)status); } }
private unsafe void EtwRegister() { uint status; // // Check only the mayor version // if (s_platformNotSupported) { throw new PlatformNotSupportedException(SR.GetString(SR.NotSupported_DownLevelVista)); } m_etwCallback = new UnsafeNativeMethods.EtwEnableCallback(EtwEnableCallBack); status = UnsafeNativeMethods.EventRegister(ref m_providerId, m_etwCallback, null, ref m_regHandle); if (status != 0) { throw new Win32Exception((int)status); } }