BY_HANDLE_FILE_INFORMATION Structure

Type BY_HANDLE_FILE_INFORMATION
  dwFileAttributes As Long
  ftCreationTime As FILETIME
  ftLastAccessTime As FILETIME
  ftLastWriteTime As FILETIME
  dwVolumeSerialNumber As Long
  nFileSizeHigh As Long
  nFileSizeLow As Long
  nNumberOfLinks As Long
  nFileIndexHigh As Long
  nFileIndexLow As Long
End Type

BY_HANDLE_FILE_INFORMATION-type variables hold various pieces of information about a file. This information includes the file's attributes; its creation, last-access, and last-modified times and dates; the serial number of the disk the file is on; the file's size; the number of links to the file in the file system; and the unique file identifier value. Notice how the file size and file index, both being 64-bit values, are split into high-order and low-order halves of 32 bits each. To get the value they represent, you can append the hexadecimal or binary values of the two halves together. You can also use the formula actualvalue = high_order * 2^32 + low_order to calculate it.

dwFileAttributes
One or more of the following flags which specify the file's various attributes:
FILE_ATTRIBUTE_ARCHIVE = &H20
An archive file (which most files are).
FILE_ATTRIBUTE_COMPRESSED = &H800
A file residing in a compressed drive or directory.
FILE_ATTRIBUTE_DIRECTORY = &H10
A directory instead of a file.
FILE_ATTRIBUTE_HIDDEN = &H2
A hidden file, not normally visible to the user.
FILE_ATTRIBUTE_NORMAL = &H80
An attribute-less file (cannot be combined with other attributes).
FILE_ATTRIBUTE_READONLY = &H1
A read-only file.
FILE_ATTRIBUTE_SYSTEM = &H4
A system file, used exclusively by the operating system.
ftCreationTime
The time and date of when the file was created.
ftLastAccessTime
The time and date of when the file was last accessed.
ftLastWriteTime
The time and date of when the file was last modified or written to.
dwVolumeSerialNumber
The serial number of the disk which the file is stored on.
nFileSizeHigh
The high-order half of the file's size.
nFileSizeLow
The low-order half of the file's size.
nNumberOfLinks
The number of links to the file in the file system. In NTFS (Win NT File System), this can be greater than one. In the FAT or FAT32 system (Win 32s, Win 95/98), this will always be 1.
nFileIndexHigh
The high-order half of a unique 64-bit identifier of the file.
nFileIndexLow
The low-order half of a unique 64-bit identifier of the file.

Used by: GetFileInformationByHandle

Go back to the alphabetical Structure listing.
Go back to the Reference section index.


This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/b/by_handle_file_information.html