This call creates a queue owned by a creating process.
DosCreateQueue
RWHandle (PHQUEUE) - output
Value
When specifying the name for a queue, the ASCIIZ name string must include the prefix \QUEUES\. Issuing DosCreateQueue creates a queue that can then be accessed by the creating process. When another process needs to access the queue, it issues DosOpenQueue with the queue's name.
The process that creates the queue owns it and has queue management privileges. Only the owner can peek at the elements in the queue with DosPeekQueue, remove them with DosReadQueue, or purge the queue of all its elements with DosPurgeQueue.
Any process that knows the queue name can open the queue after its creation with DosOpenQueue and place data in it with DosWriteQueue. It can also query the number of elements in the queue with DosQueryQueue and terminate its access to the queue with DosCloseQueue.
Whether a process gains access to the queue by creating or opening it, any thread in that process has access to the queue with equal authority. This provides the capability for multi-server queues.
A queue ceases to exist when its owner issues DosCloseQueue. If other processes use the queue handle for subsequent requests after the owner has closed the queue, ERROR_QUE_INVALID_HANDLE is returned.