Minidriver Initialization

When the operating system first initializes the minidriver, it calls the minidriver's DriverEntry routine. See DriverEntry for Stream Class Minidrivers. The minidriver must register itself with the class driver by calling StreamClassRegisterMinidriver.

The minidriver passes an HW_INITIALIZATION_DATA structure, which provides the class driver with preliminary information, including the device-wide callbacks, StrMiniReceiveDevicePacket, StrMiniCancelPacket, StrMiniRequestTimeout, and StrMiniInterrupt.

The class driver then uses StrMiniReceiveDevicePacket to signal the minidriver that it should initialize the device. It sends the SRB_INITIALIZE_DEVICE request, and passes a PORT_CONFIGURATION_INFORMATION structure with the needed hardware information. When completing this request, the minidriver supplies the size in bytes of the HW_STREAM_DESCRIPTOR structure it uses to describe all of its streams.

Once the minidriver completes that request, the class driver uses StrMiniReceiveDevicePacket to send the SRB_GET_STREAM_INFO request. The minidriver then supplies information about all of its streams, including each stream's callbacks.

Once the class driver finishes processing the stream data, it uses StrMiniReceiveDevicePacket to send the SRB_INITIALIZATION_COMPLETE request. At this point, the minidriver is ready to start handling requests on each stream.