Doubt regarding Queues in WDF

I am a newbie in WDF and was exploring WDF Queues. I had the following doubt regarding WDF Queue.
Assume that we have two WDF Queue object (for same device object) configured for Sequential dispatch, and both the Queues have EvtIoctl callback registered(i.e both the queues are supposed to handle IOCTL of different types).
Lets say Queue 1 handles IOCTL of type 1 and Queue 2 handles IOCTL of type 2.

Now, when framework wants to send an IOCTL of Type 1 to the device, will it enqueue the IOCTL(request object) to both the Queues or will it only enqueue the IOCTL(request object) to Queue 1?

First: a request is only on at most one queue at any point in time.

That almost answers your question, but unless Q1 or Q2 is the ‘default queue’ then I don’t think the order in which requests are queued is defined. If one of your 2 queues is the default queue then I think the documentation indicates that the request will be queued to the other (non-default) queue first. That queue’s request handler then has to either complete the request, forward the request, or requeue it to the other queue.

Second: this is a terrible design. Why not handle all the IOCTL in a single queue?

Right. If you don’t set a default queue, then you must use WdfDeviceConfigureRequestDispatching to tell the framework where to send your specific requests. If you don’t do either, then ioctls will be rejected with an error.