gwrite

Writes multiple buffers to a file with a single call

Local Servers:blocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Advanced

Syntax

  #include <nwfileio.h> 
    
  int gwrite  (  
     int                        fildes,   
     T_mwriteBufferStructure   *bufferP,   
     LONG                       numberOfBuffers,   
     LONG                      *numberOfBuffersWritten); 
  

Parameters

handle

(IN) Specifies the handle of the file to which data is to be written.

bufferP

(IN) Points to an array of structures of type T_mwriteBufferStructure. Each structure contains a pointer to the buffer to be written and the number of bytes to be written.

numberOfBuffers

(IN) Specifies the number of structures in bufferP.

numberOfBuffersWritten

(OUT) Points to the number of buffers actually written.

Return Values

On success, returns the number of bytes written. On failure, returns EFAILURE and sets errno and NWErrno to EBADF for a bad file handle or to other error codes as appropriate.

Remarks

The bufferP structure is defined in nwadv.h as:

  char *mwriteBufferPointer  
  LONG mwriteBufferLength  
  int  reserved 
  

See Also

qwrite