Jump to content

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

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{Legacy
|RepFunc=
|Remarks=This page list the older version of the function for reference.
}}
This call purges a queue of all elements.
This call purges a queue of all elements.


Line 12: Line 8:


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


==Remarks==
==Remarks==
Line 27: Line 22:
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>



Revision as of 12:16, 24 November 2019

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.

C Binding

#define INCL_DOSQUEUES

USHORT  rc = DosPurgeQueue(QueueHandle);

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

MASM Binding

EXTRN  DosPurgeQueue:FAR
INCL_DOSQUEUES      EQU 1

PUSH   WORD    QueueHandle   ;Queue handle
CALL   DosPurgeQueue

Returns WORD