GetFileInformationByHandle

  BOOL GetFileInformationByHandle(hFile, lpFileInformation)    
  HANDLE hFile;    
  LPBY_HANDLE_FILE_INFORMATION lpFileInformation;    

The GetFileInformationByHandle function obtains information about the specified file.

Parameters

hFile

Identifies the file to return information for.

lpFileInformation

Points to a BY_HANDLE_FILE_INFORMATION structure that receives the file information. The BY_HANDLE_FILE_INFORMATION structure has the following form:

typedef struct _BY_HANDLE_FILE_INFORMATION { /* bhfi */

DWORD dwFileAttributes;

FILETIME ftCreationTime;

FILETIME ftLastAccessTime;

FILETIME ftLastWriteTime;

DWORD dwVolumeSerialNumber;

DWORD nFileSizeHigh;

DWORD nFileSizeLow;

DWORD nNumberOfLinks;

DWORD nFileIndexHigh;

DWORD nFileIndexLow;

} BY_HANDLE_FILE_INFORMATION,

*PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.

See Also

BY_HANDLE_FILE_INFORMATION