NWReadFile(3nw)


NWReadFile -- reads data from file directly through requester

Synopsis

   #include <nwfile.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE N_API NWReadFile (NWFILE_HANDLE fileHandle, nuint32 bytesToRead, pnuint32 bytesActuallyRead, pnuint8 data);

Description

The parameters are as follows:

fileHandle
(IN) Specifies the file handle to read the data from.

bytesToRead
(IN) Specifies the number of bytes to read from the file.

bytesActuallyRead
(OUT) Points to the number of bytes actually read.

data
(OUT) Points to the return buffer where the data is deposited.

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8983
IO_ERROR_NETWORK_DISK

0x8988
INVALID_FILE_HANDLE

0x8993
NO_READ_PRIVILEGES

0x89FF
IO_BOUND_ERROR

Notices

If the end of file is reached before the read request is satisfied, the function can return an error (0x89FF).

This function fails if the calling client does not have read access privileges to the indicated file, or if a portion of the targeted byte block is locked for use by some other client.

This function does not currently buffer data. Performance will be affected by multiple short reads.

Services

File I/O

NCP calls

0x2222 23 17 Get File Server Information
0x2222 23 22 Get Station's Logged Info
0x2222 23 28 Get Station's Logged Info
0x2222 72 - Read From A File
0x2222 104 01 Ping for NDS NCP

 
 ------------------------------------------ 
| 0x2222|  23 |  17|  Get File Server     | 
|       |     |    |  Information         | 
|-------|-----|----|----------------------| 
| 0x2222|  23 |  22|  Get Station's Logged| 
|       |     |    |  Info                | 
|-------|-----|----|----------------------| 
| 0x2222|  23 |  28|  Get Station's Logged| 
|       |     |    |  Info                | 
|-------|-----|----|----------------------| 
| 0x2222|  72 |  - |  Read From A File    | 
|-------|-----|----|----------------------| 
| 0x2222|  104|  01|  Ping for NDS NCP    | 
|-------|-----|----|----------------------| 

References

NWWriteFile(3nw)


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.