ZwQueryEaFile routine

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 [in]

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

IoStatusBlock [out]

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

Buffer [out]

A pointer to a caller-supplied FILE_FULL_EA_INFORMATION-structured output buffer, where the extended attribute values are to be returned.

Length [in]

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

ReturnSingleEntry [in]

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

EaList [in, optional]

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 [in]

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

EaIndex [in, optional]

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 [in]

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 valueDescription
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

Target platform

Universal

Version

Available in Microsoft Windows 2000 and later versions of the Windows operating system.

Header

Ntifs.h (include FltKernel.h or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

FILE_FULL_EA_INFORMATION
FILE_GET_EA_INFORMATION
ZwSetEaFile

 

 

Send comments about this topic to Microsoft

Show: