DosReadQueue reads either a specified element or the first element in the queue. The first element in the queue depends on the queue type, which is specified when the queue is created. A queue can have FIFO, LIFO, or priority ordering.
Priority values range from 0 (lowest priority) through 15 (highest priority). The writing process assigns a priority to a queue element when the element is written to the queue. DosReadQueue reads elements from the queue in descending order of priority, regardless of the order in which DosWriteQueue placed the elements in the queue. Elements with equal priority are read in FIFO order.