qread

Performs a low-overhead read operation

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

Syntax

  #include <nwfileio.h>  
   
  int qread  (  
     int    fildes,   
     void  *buffer,   
     LONG   len,   
     LONG   position);  
  

Parameters

handle

(IN) Specifies the pertinent file handle.

buffer

(OUT) Points to a buffer where the data is to be received.

len

(IN) Specifies the number of bytes to read.

position

(IN) Specifies the byte offset in the file at which to start reading.

Return Values

If successful, this function returns the number of bytes read. If an error occurs, it returns -1 (EFAILURE) and errno and/or NWErrno can be set to:

Value

Name

Description

4

EBADF

Bad file number.

Other error codes as appropriate

Remarks

The qread function does not:

  • Perform parameter/context validation.

  • Maintain file position.

This function does not support:

  • Standard I/O

  • Semaphore use of the handle

  • Streams

  • BSD Sockets

See Also

qwrite