WriteEA

Writes 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 WriteEA (  
     int          handle,  
     const char  *keyBuffer,  
     const char  *dataBuffer,  
     LONG         dataBufferSize,  
     LONG         accessFlags);
  

Parameters

handle
(IN) Specifies the EA handle of the directory or file to write an EA for.
keyBuffer
(IN) Specifies an ASCIIZ string. Contains the key of EA to write. The maximum length of this buffer is 255 bytes.
dataBuffer
(IN) Specifies the buffer that contains the data to write to the EA.
dataBufferSize
(IN) Specifies the size of dataBuffer. This value must be a multiple of 128 bytes.
accessFlags
(IN) Specifies the user-defined access flags that can be used for setting additional information.

Return Values

Values for EAs are defined in nwfattr.h

This function returns the number of bytes written (equal to dataBufferSize) if successful. Otherwise, it returns:

EFAILURE

Failure ( errno and NetWareErrno are set).

Remarks

For cross-platform functionality, call NWWriteEA.

The directory or file must first be opened for extended attribute I/O with OpenEA. WriteEA writes the EA specified by the key in keyBuffer. The EA’s data is assumed to be in dataBuffer. The whole EA must be written with one call to WriteEA.

The return value of the function is the number of bytes actually written.

An EA can be deleted by setting dataBufferSize to 0 and dataBuffer to NULL.

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

See Also

CloseEA, OpenEA, ReadEA