ZwQueryInformationFile
----------------
ZwQueryInformationFile
ZwQueryInformationFile retrieves information about a file object.
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryInformationFile(
IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock,
OUT PVOID FileInformation,
IN ULONG FileInformationLength,
IN FILE_INFORMATION_CLASS FileInformationClass
);
Parameters
FileHandle
A handle to a file object.The handle must grant FILE_READ_DATA or FILE_READ_EA
access for some information classes.
IoStatusBlock
Points to a variable that receives the final completion status and information about the
requested operation.
FileInformation
Points to a caller-allocated buffer or variable that receives the requested file
information.
FileInformationLength
The size in bytes of FileInformation, which the caller should set according to the
given FileInformationClass.
FileInformationClass
Specifies the type of file information to be queried.The permitted values are a subset
of the enumeration FILE_INFORMATION_CLASS, described in the following section.
Return Value
Returns STATUS_SUCCESS or an error status, such as STATUS_ACCESS_DENIED,
STATUS_INVALID_HANDLE, STATUS_INVALID_INFO_CLASS, or STATUS_INFO_LENGTH_MISMATCH.
1996 CH13 12/1/99 12:34 PM Page 316
Files: ZwSetInformationFile 317
Related Win32 Functions
GetFileInformationByHandle, GetFileSize, GetCompressedFileSize, GetFileTime.
Remarks
ZwQueryInformationFile is documented in the DDK.