Esempio n. 1
0
        public virtual void Indicate(IntPtr pIWbemClassObject)
        {
            Marshal.AddRef(pIWbemClassObject);
            IWbemClassObjectFreeThreaded obj = new IWbemClassObjectFreeThreaded(pIWbemClassObject);

            try {
                ObjectReadyEventArgs args = new ObjectReadyEventArgs(context,
                                                                     ManagementBaseObject.GetBaseObject(obj, scope));
                watcher.FireObjectReady(args);
            } catch {}
        }
Esempio n. 2
0
        public virtual void Indicate(IntPtr pIWbemClassObject)
        {
            Marshal.AddRef(pIWbemClassObject);
            IWbemClassObjectFreeThreaded wbemClassObjectFreeThreaded = new IWbemClassObjectFreeThreaded(pIWbemClassObject);

            try
            {
                ObjectReadyEventArgs objectReadyEventArg = new ObjectReadyEventArgs(this.context, ManagementBaseObject.GetBaseObject(wbemClassObjectFreeThreaded, this.scope));
                this.watcher.FireObjectReady(objectReadyEventArg);
            }
            catch
            {
            }
        }