This call adds an element to a queue.
DosWriteQueue
QueueHandle (HQUEUE) - input
DosWriteQueue adds entries to a specified queue.
The Request, DataLength and DataBuffer parameters contain data understood by the thread adding the element to the queue and by the thread that receives the queue element. There is no special meaning to this data; applications may use these parameters for any purpose they wish. OS/2 does not alter this data; it simply copies this data intact. OS/2 does not validate the address of DataBuffer or the DataLength.
If the queue owner has defined a semaphore for use in its notification when elements are added to the queue and if that semaphore is a RAM semaphore, then that semaphore must be in a segment which is shared among both the queue owner's process and this process. If that semaphore handle is for a system semaphore, then that semaphore must be opened by this process before making a DosWriteQueue request to the queue.
If the owning process is terminated, or if the queue is closed before this request is issued, ERROR_QUE_INVALID_HANDLE is returned.
If the owning process invokes a system semaphore when DosReadQueue or DosPeekQueue is issued, other processes that issue DosWriteQueue must first issue DosOpenSem to access the system semaphore.