[This function may be changed or removed from Windows without further notice.]
Retrieves basic attributes for the specified file object.
Syntax
NTSTATUS NtQueryAttributesFile(
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_Out_ PFILE_BASIC_INFORMATION FileInformation
);
Parameters
ObjectAttributes [in]
A pointer to an OBJECT_ATTRIBUTES structure that supplies the attributes to be used for the file object.
FileInformation [out]
A pointer to a FILE_BASIC_INFORMATION structure to receive the returned file attribute information.
Return value
Returns an NTSTATUS or error code.
The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the WDK, and are described in the WDK documentation.
Remarks
This function has no associated header file. The associated import library, Ntdll.lib, is available in the WDK. You can also use the LoadLibrary and GetProcAddress functions to dynamically link to Ntdll.dll.
Requirements
| Requirement | Value |
|---|---|
| DLL | Ntdll.dll |
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
