StrMiniReceiveDevicePacket routine

The minidriver-supplied StrMiniReceiveDevicePacket routine handles class driver requests that apply to the driver as a whole, such as initializing the device, or opening a stream within the device.

Syntax


PHW_RECEIVE_DEVICE_SRB StrMiniReceiveDevicePacket;

VOID StrMiniReceiveDevicePacket(
  _In_ PHW_STREAM_REQUEST_BLOCK pSRB
)
{ ... }

Parameters

pSRB [in]

Pointer to the stream request block.

Return value

None

Remarks

The minidriver specifies this routine in the HwReceivePacket member of its HW_INITIALIZATION_DATA structure. The minidriver passes this structure to the class driver when it registers itself by calling StreamClassRegisterMinidriver.

StrMiniReceiveDevicePacket must handle class driver requests that apply to the driver as a whole, such as initializing the device, or opening a stream within the device. The class driver passes its information in the form of a pointer to a stream request block. The class driver fills in some of the entries in the stream request block. The minidriver, upon completion of the routine, must fill in additional information that the class driver will use to continue processing.

Upon completion of its handling of the request, the minidriver passes the structure back to the class driver by calling StreamClassDeviceNotification(DeviceRequestComplete, pSRB->HwDeviceExtension, pSRB).

See information about relevant SRB codes in Stream Class SRB Reference.

When the minidriver finishes its processing of the request, it enters the return status of the operation in pSrb->Status. The minidriver should enter STATUS_SUCCESS for normal successful processing. If the minidriver does not support that Command value, it should set pSrb->Status to STATUS_NOT_IMPLEMENTED. If there is a device hardware error that prevents the minidriver from completing the request, it should set pSrb->Status to STATUS_IO_DEVICE_ERROR. Other error codes the routine uses in specific circumstances are listed above with the specific Command code.

Requirements

Target platform

Header

Strmini.h (include Strmini.h)

 

 

Send comments about this topic to Microsoft

Show: