Difference between revisions of "DosQueryQueue (OS/2 1.x)"

From EDM2
Jump to: navigation, search
m
Line 1: Line 1:
==Description==
 
 
This call determines the number of elements in a queue.
 
This call determines the number of elements in a queue.
  
 
==Syntax==
 
==Syntax==
<PRE>
+
  DosQueryQueue (QueueHandle, NumberElements)
  DosQueryQueue
+
  
    (QueueHandle, NumberElements)
 
</PRE>
 
 
==Parameters==
 
==Parameters==
; QueueHandle (HQUEUE) - input : Handle of the queue to find size.  
+
;QueueHandle (HQUEUE) - input : Handle of the queue to find size.
 +
;NumberElements (PUSHORT) - output : Address of the number of entries in the queue waiting to be processed.
  
; NumberElements (PUSHORT) - output : Address of the number of entries in the queue waiting to be processed.
 
 
==Return Code==
 
==Return Code==
 
  rc (USHORT) - return
 
  rc (USHORT) - return
 
 
Return code descriptions are:
 
Return code descriptions are:
 
+
* 0     NO_ERROR
* 0         NO_ERROR  
+
* 337   ERROR_QUE_INVALID_HANDLE
* 337       ERROR_QUE_INVALID_HANDLE  
+
  
 
==Remarks==
 
==Remarks==
 
Any thread of a process that has access to the queue (because of a DosCreateQueue or a DosOpenQueue request) may issue DosQueryQueue to determine the number of elements currently in the queue.
 
Any thread of a process that has access to the queue (because of a DosCreateQueue or a DosOpenQueue request) may issue DosQueryQueue to determine the number of elements currently in the queue.
  
If the process that created the queue closes it before this request is issued, ERROR_QUE_INVALID_HANDLE is returned.  
+
If the process that created the queue closes it before this request is issued, ERROR_QUE_INVALID_HANDLE is returned.
  
 
==Example Code==
 
==Example Code==
Line 49: Line 43:
 
Returns WORD
 
Returns WORD
 
</PRE>
 
</PRE>
==Related Functions==
 
*
 
 
  
[[Category:The OS/2 API Project]]
+
[[Category:Dos]]

Revision as of 12:14, 1 March 2017

This call determines the number of elements in a queue.

Syntax

DosQueryQueue (QueueHandle, NumberElements)

Parameters

QueueHandle (HQUEUE) - input 
Handle of the queue to find size.
NumberElements (PUSHORT) - output 
Address of the number of entries in the queue waiting to be processed.

Return Code

rc (USHORT) - return

Return code descriptions are:

  • 0 NO_ERROR
  • 337 ERROR_QUE_INVALID_HANDLE

Remarks

Any thread of a process that has access to the queue (because of a DosCreateQueue or a DosOpenQueue request) may issue DosQueryQueue to determine the number of elements currently in the queue.

If the process that created the queue closes it before this request is issued, ERROR_QUE_INVALID_HANDLE is returned.

Example Code

C Binding

#define INCL_DOSQUEUES

USHORT  rc = DosQueryQueue(QueueHandle, NumberElements);

HQUEUE           QueueHandle;    /* Queue handle */
PUSHORT          NumberElements; /* Size of the queue (returned) */

USHORT           rc;             /* return code */

MASM Binding

EXTRN  DosQueryQueue:FAR
INCL_DOSQUEUES      EQU 1

PUSH   WORD    QueueHandle    ;Queue handle
PUSH@  WORD    NumberElements ;Size of the queue (returned)
CALL   DosQueryQueue

Returns WORD