dos12.hlp (Table of Contents; Topic list)
DosCloseQueue (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSQUEUES
 
USHORT DosCloseQueue(hqueue)
HQUEUE hqueue;    /* queue handle */
 
The DosCloseQueue function closes a queue. If the process calling
DosCloseQueue owns the queue, the function removes any outstanding elements
from the queue. If the process does not own the queue, the contents of the
queue remain unchanged and the queue remains available to other processes
that have it open.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hqueue     Identifies the queue to be closed. This queue must have been
           previously created or opened by using the DosCreateQueue or
           DosOpenQueue function.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
 
     ERROR_QUE_INVALID_HANDLE
 
Comments
 
After the owner closes the queue, any process that attempts to write to the
queue will receive an error value.
 
Example
 
This example creates and opens a queue, then calls the DosCloseQueue
function to close the queue:
 
HQUEUE hqueue;
DosCreateQueue(&hqueue, QUE_FIFO, "\\queues\\abc.que");
    .
    .
    .
DosCloseQueue(hqueue);
 
See Also
 
DosCreateQueue, DosOpenQueue, DosReadQueue, DosWriteQueue