c# - List of WMIEvent classes -


Recently I am learning about WMI and WQL. I got a list of Win32 classes (from MSDN) that I can query, but I am not able to locate the list of event classes (this should be a subset of the list of Win32 classes) Is this none of this list Is there a list or any kind of cheat sheet? I am asking this question with curiosity.

Examples for example category - Win32_ProcessStartTrace

C # and System.Management :

  Here is the way to list the WMI event classes in the  root \ cimv2  namespace with the system; Using System.Management; Class program {static zero main () {string query = @ "Select from Meta_Class' where __This Isa '__Event'"; Management object explorer explorer = new management object search (query); Foreach (Manager in Object BrowserBeachCimv2Class.Get ()) {Console.WriteLine (cimv2Class.ClassPath.ClassName); }}}  

root \ cimv2 is the default WMI namespace so that you do not use the ManagementScope example WQL query to ManagementObjectSearcher A WMI metadata query sent to uses this:

  • To specify the query as the schema query, and <
  • __ this property for the recurring list __ event subclass

(see more).

The WMI class is an event class if its provider should be implemented as an event WMI provider and a sub-class of the __ event does not mean that you WQL events can not use 'normal' WMI classes such as Win32_Process and Win32_Service in the event queries. You only have to use one of the __International Event Events derived assisted sections such as __InstitutionEvent or __Institution Delegation Event , and deliver WMI events

Select * from __InstanceCreationEvent within 5 where TargetInstance Isa 'Win32_Process'

/ code>

In this case you have to use the clause.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -