The ScsiPortWmiFireLogicalUnitEvent routine sends an event associated with a logical unit to the port driver for delivery to WMI data consumers that have requested notification of the event.
VOID ScsiPortWmiFireLogicalUnitEvent( _In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ LPGUID Guid, _In_ ULONG InstanceIndex, _In_ ULONG EventDataSize, _In_ PVOID EventData );
- HwDeviceExtension [in]
Pointer to the hardware device extension. This is a per-HBA storage area that the port driver allocates and initializes on behalf of the miniport driver. Miniport drivers usually store HBA-specific information in this extension, such as the state of the HBA and the HBA's mapped access ranges. This area is available to the miniport driver in the DeviceExtension->HwDeviceExtension member of the HBA's device object immediately after the miniport driver calls ScsiPortInitialize. The port driver frees this memory when it removes the device.
- PathId [in]
Identifies the SCSI bus; SP_UNTAGGED indicates all buses controlled by the HBA.
- TargetId [in]
Identifies the target controller or device on the given bus(es); SP_UNTAGGED indicates all targets on the bus.
- Lun [in]
Identifies the logical unit for the given target controller or device; SP_UNTAGGED indicates all logical units for the given target controller(s) on the given bus(es).
- Guid [in]
Pointer to the GUID that represents the event block.
- InstanceIndex [in]
If the event block has multiple instances, specifies the index of the instance.
- EventDataSize [in]
Specifies the number of bytes of data at EventData, not including pad bytes at the beginning of the event data buffer. If no data is generated for an event, EventDataSize should be set to zero.
- EventData [in]
Pointer to a miniport driver-allocated buffer containing data generated by the miniport driver for the event. The buffer must be at least the size of the event data plus 0x40 pad bytes at the beginning of the buffer.
A miniport driver calls ScsiPortWmiFireLogicalUnitEvent to send an event associated with an adapter or logical unit to all data consumers that have requested notification of the event.
The miniport driver sends an event only if it has been previously enabled by the miniport driver's HwScsiWmiFunctionControl routine.
The driver should write event data to the buffer pointed to by EventData at offset 0x40. The first 0x40 bytes are used by SCSI WMI. If no data is passed back with the event then EventData should be 0x40 bytes in length.