Jump to content

DosPurgeQueue (OS/2 1.x): Difference between revisions

From EDM2
Created page with "==Description== This call purges a queue of all elements. ==Syntax== <PRE> DosPurgeQueue (QueueHandle) </PRE> ==Parameters== ; QueueHandle (HQUEUE) - input : Handle of..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
This call purges a queue of all elements.
This call purges a queue of all elements.


==Syntax==
==Syntax==
<PRE>
  DosPurgeQueue (QueueHandle)
  DosPurgeQueue


    (QueueHandle)
</PRE>
==Parameters==
==Parameters==
; QueueHandle (HQUEUE) - input : Handle of the queue to purge.
;QueueHandle (HQUEUE) - input : Handle of the queue to purge.


==Return Code==
==Return Code==
rc (USHORT) - return
;rc (USHORT) - return:Return code descriptions are:
*0 NO_ERROR
*330 ERROR_QUE_PROC_NOT_OWNED
*337 ERROR_QUE_INVALID_HANDLE


Return code descriptions are:
* 0          NO_ERROR
* 330        ERROR_QUE_PROC_NOT_OWNED
* 337        ERROR_QUE_INVALID_HANDLE
==Remarks==
==Remarks==
A process that creates a queue with DosCreateQueue owns it. Only the owning process and any threads it creates can issue DosPurgeQueue to remove all the elements from the queue.  
A process that creates a queue with [[DosCreateQueue (OS/2 1.x)|DosCreateQueue]] owns it. Only the owning process and any threads it creates can issue DosPurgeQueue to remove all the elements from the queue.


==Example Code==
==Bindings==
===C Binding===
===C===
<PRE>
<PRE>
#define INCL_DOSQUEUES
#define INCL_DOSQUEUES
Line 29: Line 23:
USHORT  rc = DosPurgeQueue(QueueHandle);
USHORT  rc = DosPurgeQueue(QueueHandle);


HQUEUE           QueueHandle;  /* Queue handle */
HQUEUE QueueHandle;  /* Queue handle */
 
USHORT rc;            /* return code */
USHORT           rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  DosPurgeQueue:FAR
EXTRN  DosPurgeQueue:FAR
Line 44: Line 37:
Returns WORD
Returns WORD
</PRE>
</PRE>
==Related Functions==
*


[[Category:The OS/2 API Project]]
[[Category:Dos16]]

Latest revision as of 23:24, 25 January 2020

This call purges a queue of all elements.

Syntax

DosPurgeQueue (QueueHandle)

Parameters

QueueHandle (HQUEUE) - input
Handle of the queue to purge.

Return Code

rc (USHORT) - return
Return code descriptions are:
  • 0 NO_ERROR
  • 330 ERROR_QUE_PROC_NOT_OWNED
  • 337 ERROR_QUE_INVALID_HANDLE

Remarks

A process that creates a queue with DosCreateQueue owns it. Only the owning process and any threads it creates can issue DosPurgeQueue to remove all the elements from the queue.

Bindings

C

#define INCL_DOSQUEUES

USHORT  rc = DosPurgeQueue(QueueHandle);

HQUEUE  QueueHandle;   /* Queue handle */
USHORT  rc;            /* return code */

MASM

EXTRN  DosPurgeQueue:FAR
INCL_DOSQUEUES      EQU 1

PUSH   WORD    QueueHandle   ;Queue handle
CALL   DosPurgeQueue

Returns WORD