ZwSetEaFile function

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

Syntax

NTSTATUS ZwSetEaFile(
  HANDLE           FileHandle,
  PIO_STATUS_BLOCK IoStatusBlock,
  PVOID            Buffer,
  ULONG            Length
);

Parameters

FileHandle

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

IoStatusBlock

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

Buffer

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

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

   
Minimum supported client Available in Microsoft Windows 2000 and later versions of the Windows operating system.
Target Platform Universal
Header ntifs.h (include FltKernel.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules PowerIrpDDis, HwStorPortProhibitedDDIs

See Also

FILE_FULL_EA_INFORMATION

ZwQueryEaFile