Any WMI driver that registers one or more event blocks must handle this IRP. A driver can handle WMI IRPs either by calling WmiSystemControl or by handling the IRP itself, as described in Handling WMI Requests.
WMI sends this IRP to inform the driver that a data consumer has requested no further notification of an event.
WMI sends this IRP at IRQL = PASSIVE_LEVEL in an arbitrary thread context.
Parameters.WMI.ProviderId points to the device object of the driver that should respond to the request. This pointer is located in the driver's I/O stack location in the IRP.
Parameters.WMI.DataPath points to a GUID that identifies the event block to disable.
I/O Status Block
If the driver handles the IRP by calling WmiSystemControl, WMI sets Irp->IoStatus.Status and Irp->IoStatus.Information in the I/O status block.
Otherwise, the driver sets Irp->IoStatus.Status to STATUS_SUCCESS or to an appropriate error status such as the following:
On success, a driver sets Irp->IoStatus.Information to zero.
If a driver handles an IRP_MN_DISABLE_EVENTS request itself, it should do so only if Parameters.WMI.ProviderId points to the same device object as the pointer that the driver passed to IoWMIRegistrationControl. Otherwise, the driver must forward the request to the next-lower driver.
Before handling a request, the driver must determine whether Parameters.WMI.DataPath points to a GUID the driver supports. If not, the driver must fail the IRP and return STATUS_WMI_GUID_NOT_FOUND.
If the driver supports the event block, it disables the event for all instances of that block.
It is unnecessary for the driver to check whether events are already disabled for the event block because WMI sends a single disable request for that event block when the last data consumer disables the event. WMI will not send another disable request without an intervening request to enable.
For details about defining event blocks, see Designing WMI Data and Event Blocks.
|Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)|