ZwSetEaFile function (ntifs.h)

The ZwSetEaFile routine sets extended-attribute (EA) values for a file.

Syntax

NTSTATUS ZwSetEaFile(
  [in]  HANDLE           FileHandle,
  [out] PIO_STATUS_BLOCK IoStatusBlock,
  [in]  PVOID            Buffer,
  [in]  ULONG            Length
);

Parameters

[in] FileHandle

The handle for the file on which the operation is to be performed.

[out] IoStatusBlock

A pointer to an IO_STATUS_BLOCK structure that receives the final completion status and other information about the requested operation.

[in] Buffer

A pointer to a caller-supplied, FILE_FULL_EA_INFORMATION-structured input buffer that contains the extended attribute values to be set.

[in] Length

Length, in bytes, of the buffer that the Buffer parameter points to.

Return value

ZwSetEaFile returns STATUS_SUCCESS or an appropriate NTSTATUS value such as the following:

Return value Description
STATUS_EA_LIST_INCONSISTENT
The EaList parameter is not formatted correctly. This is an error code.

Requirements

Requirement Value
Minimum supported client Windows 2000
Target Platform Universal
Header ntifs.h (include FltKernel.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)

See also

FILE_FULL_EA_INFORMATION

ZwQueryEaFile