【文章标题】: WMI设备管理06
【文章作者】: 有酒醉
【作者邮箱】: wuqr32@sina.com
【下载地址】: 自己搜索下载
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
2、内部事件.内部事件用于响应WMI标准模型的变换,比如提供者,类,实例,命名空间的创建,删除,修改.
内部事件列表(查阅MSDN):
类名:__ClassCreationEvent
描述:当一个WMI新类被创建时产生该事件
类名:__ClassDeletionEvent
描述:当一个WMI类被删除时产生该事件.
类名:__ClassModificationEvent
描述:当一个WMI类被删除时产生该事件.
类名:__InstanceCreationEvent
描述:当一个WMI实例被创建时产生该事件
类名:__InstanceOperationEvent
描述:当一个实例被创建,修改,删除,等等操作发生时产生该时间.此类可以用来检测一个实例的所有类型的事件
类名:__InstanceDeletionEvent
描述:当一个实例被删除时产生该事件
类名:__InstanceModificationEvent
描述:当一个实例被修改时产生该事件
类名:__NamespaceCreationEvent
描述:当一个命名空间被创建时产生该事件
类名:__NamespaceDeletionEvent
描述:当一个命名空间被删除时产生该事件
类名:__NamespaceModificationEvent
描述:当一个命名空间被修改时产生该事件
类名:__ConsumerFailureEvent
描述:Notifies a consumer when some other event is dropped due to a failure on the part of an event consumer.
类名:__EventDroppedEvent
描述:Notifies a consumer when some other event is dropped instead of delivered to the requesting event consumer.
类名:__EventQueueOverflowEvent
描述:Notifies a consumer when an event is dropped as a result of delivery queue overflow.
类名:__MethodInvocationEvent
描述:Notifies a consumer when a method call event occurs. This class is new for Windows? XP.
示例 -- WMI类删除时产生事件











































运行如下:
E:/>WmiClassDelete
Class Deleted=YzlClass
E:/>
3、外部事件.这些是完全自定义的事件,并且通过提供程序定义并实现他们.
<续>
--------------------------------------------------------------------------------
【版权声明】: 本文原创于泉州软件基地, 转载请注明作者并保持文章的完整, 谢谢!
2007年03月15日 16:32:22