The WmiFireEvent routine sends an event to WMI for delivery to data consumers that have requested notification of the event.
NTSTATUS WmiFireEvent( _In_ PDEVICE_OBJECT DeviceObject, _In_ LPCGUID Guid, _In_ ULONG InstanceIndex, _In_ ULONG EventDataSize, _In_opt_ PVOID EventData );
A pointer to the driver's DEVICE_OBJECT.
A pointer to the GUID that represents the event block.
If the event block has multiple instances, specifies the index of the instance.
Specifies the number of bytes of data at EventData. If no data is generated for an event, EventData must be zero.
A pointer to a driver-allocated nonpaged buffer containing data generated by the driver for the event. If no data is generated for an event, EventData must be NULL. WMI frees the buffer without further intervention by the driver.
WmiFireEvent propagates the status returned by IoWmiWriteEvent, or returns STATUS_INSUFFICIENT_RESOURCES if it could not allocate memory for the event.
A driver calls WmiFireEvent to send an event to WMI for delivery to all data consumers that have requested notification of the event. All pointers passed to WmiFireEvent must point to nonpagable memory, such as nonpaged pool.
The driver sends an event only if it has been previously enabled by the driver's DpWmiFunctionControl routine, which WMI calls to process an IRP_MN_ENABLE_EVENT request.
For more information about event tracing, see WMI Event Tracing.
|Windows version||Available starting with Windows 2000.|
|Header||wmilib.h (include Wmilib.h)|