3.3.5.3.3 Processing an IO Control Message

The structure and fields of the IO_CONTROL message are specified in section 2.2.6.3.

After receiving the IO_CONTROL message, the client MUST forward the request to the physical device by retrieving the IOCTL code and input/output buffers from IoControlCode, InputBuffer, InputBufferSize  and OutputBufferSize fields from the message. The output buffer parameter in the forwarded IOCTL is allocated with the size of OutputBufferSize field. When the physical device completes the request, the client MUST send the result of the request to the server via the IOCONTROL_COMPLETION message and the RequestId field in the IOCONTROL_COMPLETION message MUST match the RequestId in the IO_CONTROL message.

The IO_CONTROL message contains the OutputBufferSize field. This indicates the maximum amount of data the client can send to the server when sending the final result of this request. If the physical device returns more data than the OutputBufferSize field specifies, the client MUST terminate the dynamic virtual channel.