Jump to content

DevHelp QueueInit: Difference between revisions

From EDM2
Created page with "This service initializes the specified character queue structure. ==Syntax== ===C=== USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue) ===Assembler=== <PRE> MOV BX,OFFSET..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
This service initializes the specified character queue structure.  
This service initializes the specified character queue structure.


==Syntax==
==Syntax==
===C===
;C
  USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue)
  USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue)


===Assembler===
;Assembler
<PRE>
MOV  BX,OFFSET DS:queue      ; Points to the queue structure to be initialized.
MOV  BX,OFFSET DS:queue      ; Points to the queue structure to be initialized.
                              ; (The Qsize field must be set up.)
                              ; (The Qsize field must be set up.)
MOV  DL,DevHlp_QueueInit
MOV  DL,DevHlp_QueueInit
CALL  [Device_Help]


CALL  [Device_Help]
</PRE>
==Parameters==
==Parameters==
===C===
;Queue (NPBYTE) : input - Near pointer to the queue structure to be initialized. (The Qsize field must be set up.)
; Queue (NPBYTE) : input - Near pointer to the queue structure to be initialized. (The Qsize field must be set up.)
 
===Assembler===
<PRE>
MOV  BX,OFFSET DS:queue      ; Points to the queue structure to be initialized.
                              ; (The Qsize field must be set up.)
</PRE>


==Return Code==
==Return Code==
 
None.
===C===
None .
 
===Assembler===
None .


==Remarks==
==Remarks==
This function must be called before any other queue manipulation subroutine. Prior to this call, the physical device driver must allocate the character queue buffer with the following queue header:
This function must be called before any other queue manipulation subroutine. Prior to this call, the physical device driver must allocate the character queue buffer with the following queue header:
  type def struct_QUEUEHDR{
  type def struct_QUEUEHDR{
     USHORT QSize;
     USHORT QSize;
     USHORT QChrOut;
     USHORT QChrOut;
Line 41: Line 26:
     BYTE  Queue [1];
     BYTE  Queue [1];
   }QUEUEHDR;
   }QUEUEHDR;
The Qsize field should be initialized by the physical device driver before calling QueueInit.  
The Qsize field should be initialized by the physical device driver before calling QueueInit.  


==Example Code==
==Example Code==
===C===
;C
<PRE>
<PRE>
USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue)
USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue)


       typedef struct _QUEUEHDR  {            /* DHQH */
       typedef struct _QUEUEHDR  {            /* DHQH */
         USHORT  QSize;
         USHORT  QSize;
         USHORT  QChrOut;
         USHORT  QChrOut;
Line 60: Line 42:
       typedef QUEUEHDR *PQUEUEHDR;
       typedef QUEUEHDR *PQUEUEHDR;
</PRE>
</PRE>
==Related Functions==


[[Category:DevHlps]]
[[Category:DevHlps]]

Revision as of 10:46, 5 April 2025

This service initializes the specified character queue structure.

Syntax

C
USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue)
Assembler
MOV   BX,OFFSET DS:queue      ; Points to the queue structure to be initialized.
                              ; (The Qsize field must be set up.)
MOV   DL,DevHlp_QueueInit

CALL  [Device_Help]

Parameters

Queue (NPBYTE)
input - Near pointer to the queue structure to be initialized. (The Qsize field must be set up.)

Return Code

None.

Remarks

This function must be called before any other queue manipulation subroutine. Prior to this call, the physical device driver must allocate the character queue buffer with the following queue header:

type def struct_QUEUEHDR{
   USHORT QSize;
   USHORT QChrOut;
   USHORT QCount;
   BYTE   Queue [1];
  }QUEUEHDR;

The Qsize field should be initialized by the physical device driver before calling QueueInit.

Example Code

C
USHORT APIENTRY DevHelp_QueueInit (NPBYTE Queue)

       typedef struct _QUEUEHDR  {             /* DHQH */
         USHORT   QSize;
         USHORT   QChrOut;
         USHORT   QCount;
         BYTE     Queue[1];
       } QUEUEHDR;

       typedef QUEUEHDR *PQUEUEHDR;