Expand Minimize

ScsiPortWmiGetInstanceName routine

The ScsiPortWmiGetInstanceName routine returns a pointer to the instance name associated with the indicated the Windows Management Instrumentation (WMI) SCSI Request Block (SRB).

Syntax


PWCHAR ScsiPortWmiGetInstanceName(
  _In_  PSCSIWMI_REQUEST_CONTEXT RequestContext
);

Parameters

RequestContext [in]

Pointer to a structure of type SCSIWMI_REQUEST_CONTEXT that contains the request context for a WMI SRB.

Return value

Pointer to a counted string containing the instance name associated with the indicated SRB. If the SRB type is one that does not use an instance name, ScsiPortWmiGetInstanceName returns NULL.

Remarks

The parameter RequestContext points to a request context structure, SCSIWMI_REQUEST_CONTEXT, that contains information associated with a Windows Management Instrumentation (WMI) SCSI request block (SRB). The request context structure, in turn, contains one of the WMI WNODE_XXX Structures that is used by the WMI system to pass data between user-mode data consumers and kernel-mode data providers such as drivers.

The WNODE_XXX structure contained in the request context holds an instance name associated with the WMI SRB. The miniport driver calls ScsiPortWmiGetInstanceName to extract this instance name from the request context.

The memory allocated for the request context must remain valid until after the miniport driver calls ScsiPortWmiPostProcess, and ScsiPortWmiPostProcess returns the final SRB status and buffer size. If the SRB can pend, the memory for the request context should be allocated from the SRB extension. If the SRB cannot pend, the memory can be allocated from a stack frame that does not go out of scope.

Requirements

Header

Scsiwmi.h (include Miniport.h or Scsi.h)

See also

SCSIWMI_REQUEST_CONTEXT
WNODE_SINGLE_INSTANCE
WNODE_ALL_DATA

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft