SRB_READ_DATA

The class driver has received a read request for the minidriver.

Return Value

The minidriver can set one of the following as the status in the SRB, or it can pass additional error codes to indicate error situations such as memory errors and bad parameters. The class driver checks only for STATUS_SUCCESS.

STATUS_SUCCESS
Indicates successful completion of the command.

STATUS_NOT_IMPLEMENTED
Indicates that the function is not supported by the minidriver.

STATUS_IO_DEVICE_ERROR
Indicates that a hardware failure occurred.

Comments

The value of pSrb->CommandData.DataBufferArray points to an array of KSSTREAM_HEADER structures, which together describe the data buffer. The pSrb pointer points to a HW_STREAM_REQUEST_BLOCK structure. pSrb->CommandData.NumberOfBuffers specifies the size of the array.

When the SRB_READ_DATA command is received by the minidriver, the responding minidriver routine should:

  1. Check to determine the current stream state. The minidriver should only accept read requests when in either the Pause or Run state. If the stream is stopped, it should immediately complete and return the SRB.

  2. Place the SRB in the queue.