The IoWMIWriteEvent routine delivers a given event to the user-mode WMI components for notification.
NTSTATUS
IoWMIWriteEvent(
IN PVOID WnodeEventItem
);
IoWMIWriteEvent returns a status code from the following list:
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
The WNODE_EVENT_ITEM structure that is allocated by the caller and passed in WnodeEventItem must be allocated from nonpaged pool. If IoWMIWriteEvent returns STATUS_SUCCESS, the memory for the event item will automatically be freed by the system. If IoWMIWriteEvent returns anything other than STATUS_SUCCESS, it is the caller's responsibility to free the buffer.
Drivers should only call IoWMIWriteEvent for events that have been enabled for WMI. This ensures that there is an event consumer waiting for indication on that event.
Callers of this routine must be running at IRQL < DISPATCH_LEVEL.