private void RegisterWbemProvider(object state)
        {
            this.wbemRegistrar = (WbemNative.IWbemDecoupledRegistrar) new WbemNative.WbemDecoupledRegistrar();
            int num = this.wbemRegistrar.Register(0, null, null, null, this.nameSpace, this.appName, this);

            if (num != 0)
            {
                DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error, EventLogCategory.Wmi, (EventLogEventId)(-1073610734), new string[] { TraceUtility.CreateSourceString(this), num.ToString("x", CultureInfo.InvariantCulture) });
                this.wbemRegistrar = null;
            }
        }
 private void UnRegisterWbemProvider(object state)
 {
     if (this.wbemRegistrar != null)
     {
         int num = this.wbemRegistrar.UnRegister();
         if (num != 0)
         {
             DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error, EventLogCategory.Wmi, (EventLogEventId)(-1073610733), new string[] { TraceUtility.CreateSourceString(this), num.ToString("x", CultureInfo.InvariantCulture) });
         }
         this.wbemRegistrar = null;
     }
 }
 void UnRegisterWbemProvider(object state)
 {
     if (this.wbemRegistrar != null)
     {
         int hr = this.wbemRegistrar.UnRegister();
         if ((int)WbemNative.WbemStatus.WBEM_S_NO_ERROR != hr)
         {
             DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error,
                 (ushort)System.Runtime.Diagnostics.EventLogCategory.Wmi,
                 (uint)System.Runtime.Diagnostics.EventLogEventId.WmiUnregistrationFailed,
                 TraceUtility.CreateSourceString(this),
                 hr.ToString("x", CultureInfo.InvariantCulture));
         }
         this.wbemRegistrar = null;
     }
 }
        void RegisterWbemProvider(object state)
        {
            this.wbemRegistrar = (WbemNative.IWbemDecoupledRegistrar)new WbemNative.WbemDecoupledRegistrar();
            int hr = this.wbemRegistrar.Register(0, null, null, null,
                this.nameSpace, this.appName, this);
            if ((int)WbemNative.WbemStatus.WBEM_S_NO_ERROR != hr)
            {
                DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error,
                    (ushort)System.Runtime.Diagnostics.EventLogCategory.Wmi,
                    (uint)System.Runtime.Diagnostics.EventLogEventId.WmiRegistrationFailed,
                    TraceUtility.CreateSourceString(this),
                    hr.ToString("x", CultureInfo.InvariantCulture));

                this.wbemRegistrar = null;
            }
        }
 void UnRegisterWbemProvider(object state)
 {
     if (this.wbemRegistrar != null)
     {
         int hr = this.wbemRegistrar.UnRegister();
         if ((int)WbemNative.WbemStatus.WBEM_S_NO_ERROR != hr)
         {
             DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error,
                                                 (ushort)System.Runtime.Diagnostics.EventLogCategory.Wmi,
                                                 (uint)System.Runtime.Diagnostics.EventLogEventId.WmiUnregistrationFailed,
                                                 TraceUtility.CreateSourceString(this),
                                                 hr.ToString("x", CultureInfo.InvariantCulture));
         }
         this.wbemRegistrar = null;
     }
 }
        void RegisterWbemProvider(object state)
        {
            this.wbemRegistrar = (WbemNative.IWbemDecoupledRegistrar) new WbemNative.WbemDecoupledRegistrar();
            int hr = this.wbemRegistrar.Register(0, null, null, null,
                                                 this.nameSpace, this.appName, this);

            if ((int)WbemNative.WbemStatus.WBEM_S_NO_ERROR != hr)
            {
                DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error,
                                                    (ushort)System.Runtime.Diagnostics.EventLogCategory.Wmi,
                                                    (uint)System.Runtime.Diagnostics.EventLogEventId.WmiRegistrationFailed,
                                                    TraceUtility.CreateSourceString(this),
                                                    hr.ToString("x", CultureInfo.InvariantCulture));

                this.wbemRegistrar = null;
            }
        }
 private void RegisterWbemProvider(object state)
 {
     this.wbemRegistrar = (WbemNative.IWbemDecoupledRegistrar) new WbemNative.WbemDecoupledRegistrar();
     int num = this.wbemRegistrar.Register(0, null, null, null, this.nameSpace, this.appName, this);
     if (num != 0)
     {
         DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error, EventLogCategory.Wmi, (EventLogEventId) (-1073610734), new string[] { TraceUtility.CreateSourceString(this), num.ToString("x", CultureInfo.InvariantCulture) });
         this.wbemRegistrar = null;
     }
 }
 private void UnRegisterWbemProvider(object state)
 {
     if (this.wbemRegistrar != null)
     {
         int num = this.wbemRegistrar.UnRegister();
         if (num != 0)
         {
             DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error, EventLogCategory.Wmi, (EventLogEventId) (-1073610733), new string[] { TraceUtility.CreateSourceString(this), num.ToString("x", CultureInfo.InvariantCulture) });
         }
         this.wbemRegistrar = null;
     }
 }