ReadEA

Reads EAs

Local Servers:blocking
Remote Servers:blocking
Classification:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Service:Server-Based Extended Attributes

Syntax

  #include <\nlm\nit\nwextatt.h>  
   
  int ReadEA (  
     int          handle,  
     const char  *keyBuffer,  
     char        *dataBuffer,  
     LONG         dataBufferSize,  
     LONG        *accessFlags);
  

Parameters

handle
(IN) Specifies the EA handle of the directory or file from which to read an EA.
keyBuffer
(IN) Specifies the ASCIIZ string. Contains key of EA to read. The maximum length of this buffer is 255 bytes.
dataBuffer
(OUT) Specifies the buffer into which the data portion of the EA is read.
dataBufferSize
(IN) Specifies the size of dataBuffer. This value must be a multiple of 128 bytes.
accessFlags
(OUT) Returns access flags (set by WriteEA).

Return Values

This function returns the number of bytes read (1- 64 KB) if successful. Otherwise, it returns:

EFAILURE

Failure ( errno and NetWareErrno are set).

Remarks

For cross-platform functionality, call NWReadEA.

The directory or file must first be opened for extended attribute I/O with OpenEA. ReadEA reads the EA specified by the key in keyBuffer. The EA is read into dataBuffer. The return value of the function is the number of bytes that are actually read. The accessFlags parameter is the user-defined value set by WriteEA.

The whole EA must be read with one call to ReadEA. If the dataBuffer is too small, an error and no data is returned. The maximum length of data is 64 KB. EnumerateEA can be used to determine how long an EA’s data value is.

This function does not work on remote NetWare 3.x servers.

See Also

CloseEA, OpenEA, WriteEA