Buf_T

Initializes and handles input and output buffers.

Service:NDS
Defined In:nwdsbuft.h and nwdsbuft.inc

Structure

C

  typedef struct 
  { 
     nuint32   operation ; 
     nuint32   flags ; 
     nuint32   maxLen ; 
     nuint32   curLen ; 
     pnuint8   lastCount ; 
     pnuint8   curPos ; 
     pnuint8   data ; 
  } Buf_T;
  

Pascal

  Buf_T = Record 
      operation : nuint32; 
      flags : nuint32; 
      maxLen : nuint32; 
      curLen : nuint32; 
      lastCount : pnuint8; 
      curPos : pnuint8; 
      data : pnuint8 
   End;
  

Fields

operation

Specifies the verb of the function operating on the buffer; set by NWDSInitBuf. The operation determines the type of data in the buffer. For a list of operation types, see Section 5.3, Buffer Operation Types and Related Functions.

flags

Specifies the set of bit flags. Only the first bit is defined. If it is set, the buffer contains input data. If this bit is clear, the buffer contains results:

  • 0x0001 ($00000001) INPUT_BUFFER
maxLen

Specifies the amount of memory allocated when NWDSAllocBuf is called. This is the maximum length of data the buffer can contain. This member is set to 0 when the buffer is allocated.

curLen

Specifies the length of the current buffer. Its value is manipulated internally by get and put routines only. This member is set to 0 when the buffer is allocated or initialized. For an output buffer, this member is the total bytes of data received by the client.

lastCount

Points to the number of items in the data currently stored in the buffer. It is manipulated internally for iterative operations on the buffer.

curPos

Points to the offset in the data area where the next operation should occur. This member is set to the start of the buffer to which the data field points when the buffer is allocated or initialized, or when a result is returned. The "put" and "get" functions update the member. It is manipulated internally.

data

Points to the actual data stored in the buffer.