ZwQueryEaFile

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

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

IRQL

PASSIVE_LEVEL

See Also

FILE_FULL_EA_INFORMATION

FILE_GET_EA_INFORMATION

ZwSetEaFile

 

 

Send comments about this topic to Microsoft

Build date: 6/3/2010