WNODE_EVENT_ITEM structure (wmistr.h)

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

Syntax

typedef struct tagWNODE_EVENT_ITEM {
  struct _WNODE_HEADER WnodeHeader;
} WNODE_EVENT_ITEM, *PWNODE_EVENT_ITEM;

Members

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.

Remarks

The WnodeHeader member of the WNODE_EVENT_ITEM structure is followed by a structure whose type depends on the flags that are set in WnodeHeader. Possibilities include WNODE_ALL_DATA, WNODE_SINGLE_INSTANCE, and WNODE_SINGLE_ITEM. For more information about the flags, see WNODE_HEADER.

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.

Requirements

Requirement Value
Header wmistr.h (include Wmistr.h)

See also

IRP_MN_ENABLE_EVENTS

IoWMIDeviceObjectToProviderId

IoWMIWriteEvent

WNODE_ALL_DATA

WNODE_EVENT_REFERENCE

WNODE_HEADER

WNODE_SINGLE_INSTANCE

WNODE_SINGLE_ITEM