Previous Next

WNODE_EVENT_ITEM

The WNODE_EVENT_ITEM structure contains data generated by a driver for an event.

typedef struct tagWNODE_EVENT_ITEM {
  struct _WNODE_HEADER    WnodeHeader;
                          // Rest of WNODE data indicated by
                          // flags in WnodeHeader
} WNODE_EVENT_ITEM, *PWNODE_EVENT_ITEM;
WnodeHeader
Specifies a WNODE_HEADER structure that contains information common to all WNODE_XXX structures, such as the buffer size, the GUID that represents a data block associated with a request, and flags that provide information about the WNODE_XXX data being passed or returned.

Headers

Defined in wmistr.h. Include wmistr.h.

Comments

A WNODE_EVENT_ITEM contains whatever data the driver determines is appropriate for an event, in a WNODE_XXX structure that is appropriate for that data.

The ProviderId member of the WNODE_HEADER structure for use in a WNODE_EVENT_ITEM structure should be initialized using IoWMIDeviceObjectToProviderId.

A driver generates only events that it has previously enabled in response to an IRP_MN_ENABLE_EVENTS request. To generate an event, a driver calls IoWMIWriteEvent and passes a pointer to the WNODE_EVENT_ITEM. WMI queues the event for delivery to all data consumers registered for that event.

For best performance, events should be small in size. However, if the amount of data for an event exceeds the maximum size defined in the registry, a driver can pass a WNODE_EVENT_REFERENCE, which WMI uses to query for the related WNODE_EVENT_ITEM. For more information about defining and generating WMI events, see Windows Management Instrumentation.

See Also

IoWMIWriteEvent, IoWMIDeviceObjectToProviderId, IRP_MN_ENABLE_EVENTS, WNODE_ALL_DATA, WNODE_EVENT_REFERENCE, WNODE_HEADER, WNODE_SINGLE_INSTANCE, WNODE_SINGLE_ITEM