ZwQueryEaFile function

The ZwQueryEaFile routine returns information about extended-attribute (EA) values for a file.

Syntax

NTSTATUS ZwQueryEaFile(
  _In_     HANDLE           FileHandle,
  _Out_    PIO_STATUS_BLOCK IoStatusBlock,
  _Out_    PVOID            Buffer,
  _In_     ULONG            Length,
  _In_     BOOLEAN          ReturnSingleEntry,
  _In_opt_ PVOID            EaList,
  _In_     ULONG            EaListLength,
  _In_opt_ PULONG           EaIndex,
  _In_     BOOLEAN          RestartScan
);

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 output buffer, where the extended attribute values are to be returned.

Length

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

ReturnSingleEntry

Set to TRUE if ZwQueryEaFile should return only the first entry that is found.

EaList

A pointer to a caller-supplied FILE_GET_EA_INFORMATION-structured input buffer, which specifies the extended attributes to be queried. This parameter is optional and can be NULL.

EaListLength

The length, in bytes, of the buffer that the EaList parameter points to.

EaIndex

The index of the entry at which scanning the file's extended-attribute list should begin. This parameter is ignored if the EaList parameter points to a nonempty list. This parameter is optional and can be NULL.

RestartScan

Set to TRUE if ZwQueryEaFile should begin the scan at the first entry in the file's extended-attribute list. If this parameter is set to FALSE, the routine resumes the scan from a previous call to ZwQueryEaFile.

Return Value

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

Return value Description
STATUS_EAS_NOT_SUPPORTED
The file system does not support extended attributes. This is an error code.
STATUS_INSUFFICIENT_RESOURCES
The ZwQueryEaFile routine encountered a pool allocation failure. This is an error code.
STATUS_EA_LIST_INCONSISTENT
The EaList parameter is not formatted correctly. This is an error code.

Requirements

   
Windows version Available in Microsoft Windows 2000 and later versions of the Windows operating system. 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

ZwSetEaFile

FILE_FULL_EA_INFORMATION

FILE_GET_EA_INFORMATION

Send comments about this topic to Microsoft