#include <nwnamspc.h> #include <nwea.h> or #include <nwcalls.h>NWCCODE N_API NWWriteEA (NW_EA_HANDLE N_FAR EAHandle, nuint32 totalWriteSize, nuint32 bufferSize, pnuint8 buffer, pnuint32 amountWritten);
NWWriteEA returns 0x0000 when there is more data in the EA and NWWriteEA needs to be called again. NWWriteEA returns 0x0001 when there is valid data in the buffer but none left in the EA.
NWReadEA and NWWriteEA can perform multiple actions, such as opening or creating an EA and then performing the appropriate function. To properly end NWWriteEA, NWCloseEA must be called after the last Read, Write, and/or Find EA function.
Extended Attribute values should always be read or written completely. Extended Attributes are not treated like files when transferring. Therefore, partial Reads or Writes are not allowed.
Before calling NWWriteEA, an application must properly initialize NW_EA_HANDLE to access the EA database. An application can initialize NW_EA_HANDLE by calling NWFindFirstEA, NWFindNextEA, NWGetEAHandleStruct, or NWOpenEA. NW_EA_HANDLE is for internal use only; applications must not manipulate it in any way.
For Writes, bufferSize should be at least 512 bytes. If bufferSize is less than totalWriteSize, it must be a multiple of 512.
NWWriteEA writes up to the bufferSize number of EA information bytes or until the end of the EA data, whichever comes first. If the data to be written is larger than the buffer size, NWWriteEA must be called multiple times to write all the data to the EA.
An application should complete the entire Write before closing the EA.
0x2222 | 86 | 02 | Write Extended Attribute |
0x2222 86 02 Write Extended Attribute