[Applies to KMDF only]
The WdfWmiInstanceFireEvent method sends a WMI event to WMI clients that have registered to receive event notification.
NTSTATUS WdfWmiInstanceFireEvent( WDFWMIINSTANCE WmiInstance, ULONG EventDataSize, PVOID EventData );
A handle to a WMI instance object that the driver obtained from a previous call to WdfWmiInstanceCreate.
The size, in bytes, of the event data that EventData points to.
A pointer to the event data, or NULL if there is no event data.
WdfWmiInstanceFireEvent returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return one of the following values:
||There was insufficient memory.|
||The framework's attempt to communicate with WMI failed.|
||The event data buffer was too large.|
This method also might return other NTSTATUS values.
A bug check occurs if the driver supplies an invalid object handle.
Your driver should call WdfWmiInstanceFireEvent only if a WMI client has registered for event notification. The driver can determine if it should call WdfWmiInstanceFireEvent by providing an EvtWmiProviderFunctionControl callback function or calling WdfWmiProviderIsEnabled.
The driver should place its event-specific data, if any, in the buffer that the EventData parameter points to. The framework adds all of the necessary WMI header information.
For more information about the WdfWmiInstanceFireEvent method, see Supporting WMI in Framework-Based Drivers.
The following code example sends a WMI event to WMI clients.
MY_WMI_EVENT_DATA eventData; NTSTATUS status; status = WdfWmiInstanceFireEvent( WmiInstance, sizeof(eventData), (PVOID)&eventData );
|Minimum KMDF version||1.0|
|Header||wdfwmi.h (include Wdf.h)|
|Library||Wdf01000.sys (see Framework Library Versioning.)|
|DDI compliance rules||DriverCreate, KmdfIrql, KmdfIrql2|