SCSI_WMILIB_CONTEXT structure

A SCSI_WMILIB_CONTEXT structure provides registration information for a miniport driver's data and event blocks and defines entry points for the miniport driver's HwScsiWmiXxx callback routines.

Syntax


typedef struct _SCSIWMILIB_CONTEXT {
  ULONG                     GuidCount;
  PSCSIWMIGUIDREGINFO       GuidList;
  PSCSIWMI_QUERY_REGINFO    QueryWmiRegInfo;
  PSCSIWMI_QUERY_DATABLOCK  QueryWmiDataBlock;
  PSCSIWMI_SET_DATABLOCK    SetWmiDataBlock;
  PSCSIWMI_SET_DATAITEM     SetWmiDataItem;
  PSCSIWMI_EXECUTE_METHOD   ExecuteWmiMethod;
  PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl;
} SCSI_WMILIB_CONTEXT, *PSCSI_WMILIB_CONTEXT;

Members

GuidCount

Specifies the number of structures in the SCSIWMIGUIDREGINFO array at GuidList.

GuidList

Points to an array of GuidCount SCSIWMIGUIDREGINFO structures that contain registration information for each block.

QueryWmiRegInfo

Points to the driver's HwScsiWmiQueryReginfo routine, which is a required entry point for miniport drivers that support WMI.

QueryWmiDataBlock

Points to the driver's HwScsiWmiQueryDataBlock routine, which is a required entry point for miniport drivers that support WMI.

SetWmiDataBlock

Points to the driver's HwScsiWmiSetDataBlock routine, which is an optional entry point for miniport drivers that support WMI. If the miniport driver does not implement this routine, it must set this member to NULL

SetWmiDataItem

Points to the driver's HwScsiWmiSetDataItem routine, which is an optional entry point for miniport drivers that support WMI. If the miniport driver does not implement this routine, it must set this member to NULL.

ExecuteWmiMethod

Points to the driver's HwScsiWmiExecuteMethod routine, which is an optional entry point for miniport drivers that support WMI. If the miniport driver does not implement this routine, it must set this member to NULL

WmiFunctionControl

Points to the driver's HwScsiWmiFunctionControl routine, which is an optional entry point for miniport drivers that support WMI. If the miniport driver does not implement this routine, it must set this member to NULL.

Remarks

A SCSI miniport driver that supports WMI stores an initialized SCSI_WMILIB_CONTEXT structure (or a pointer to such a structure) in its device extension. A miniport driver can use the same SCSI_WMILIB_CONTEXT structure for multiple device objects if each device object supplies the same set of data blocks.

When the miniport driver receives an SRB in which the Function member is set to SRB_FUNCTION_WMI, it calls ScsiPortWmiDispatchFunction with request parameters, including a pointer to an initialized SCSI_WMILIB_CONTEXT structure. ScsiPortWmiDispatchFunction handles the request by calling the miniport driver's appropriate HwScsiWmiXxx routine.

If the miniport driver does not implement an optional HwScsiWmiXxx routine, the port driver returns an appropriate status to the caller.

Requirements

Header

Scsiwmi.h (include Scsiwmi.h)

See also

HwScsiWmiExecuteMethod
HwScsiWmiFunctionControl
HwScsiWmiQueryDataBlock
HwScsiWmiQueryReginfo
HwScsiWmiSetDataBlock
HwScsiWmiSetDataItem
ScsiPortWmiDispatchFunction
SCSIWMIGUIDREGINFO

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft