DevHelp QueueInit

From EDM2
Jump to: navigation, search

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

C

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

Assembler

MOV   BX,OFFSET DS:queue      ; Points to the queue structure to be initialized.
                              ; (The Qsize field must be set up.)

Return Code

C

None .

Assembler

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;

Related Functions