Partager via


BY_HANDLE_FILE_INFORMATION (Windows CE 5.0)

Send Feedback

This structure contains information retrieved by the GetFileInformationByHandle function.

typedef struct _BY_HANDLE_FILE_INFORMATION { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD dwVolumeSerialNumber; DWORD nFileSizeHigh; DWORD nFileSizeLow; DWORD nNumberOfLinks; DWORD nFileIndexHigh; DWORD nFileIndexLow;DWORDdwOID;} BY_HANDLE_FILE_INFORMATION; 

Members

  • dwFileAttributes
    File attributes. The following table shows the possible values for dwFileAttributes.

    Value Description
    FILE_ATTRIBUTE_ARCHIVE Indicates that the file or directory is an archive file. Applications use this attribute to mark files for backup or removal.
    FILE_ATTRIBUTE_COMPRESSED Indicates that the file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories.
    FILE_ATTRIBUTE_DIRECTORY Indicates that the handle identifies a directory.
    FILE_ATTRIBUTE_ENCRYPTED Indicates that the file or directory is encrypted. For a file, this means that all of the data streams are encrypted. For a directory, this means that encryption is the default for newly created files and directories.
    FILE_ATTRIBUTE_HIDDEN Indicates that the file or directory is hidden. It is not included in an ordinary directory listing.
    FILE_ATTRIBUTE_INROM Indicates that this file is an operating system file stored in ROM. These files are read-only; they cannot be modified.
    FILE_ATTRIBUTE_NORMAL Indicates that the file has no other attributes. This attribute is valid only if used alone.
    FILE_ATTRIBUTE_READONLY Indicates that the file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it.
    FILE_ATTRIBUTE_REPARSE_POINT Indicates that the file has an associated reparse point.
    FILE_ATTRIBUTE_ROMMODULE Indicates that this file is an operating system file stored in ROM, designed to execute in place. In other words, code from this file is executed directly from ROM, rather than being first copied to RAM. The CreateFile function cannot be used to access this file, instead the LoadLibrary and CreateProcess functions must be used.
    FILE_ATTRIBUTE_ROMSTATICREF Indicates that the DLL module is implicitly linked to another module in the ROM file system. This prevents the DLL module from being replaced by a RAM version of the DLL.
    FILE_ATTRIBUTE_SPARSE_FILE Indicates that the file is a sparse file.
    FILE_ATTRIBUTE_SYSTEM Indicates that the file or directory is part of the operating system or is used exclusively by the operating system.
    FILE_ATTRIBUTE_TEMPORARY Indicates that the file is being used for temporary storage. File systems attempt to keep all the data in memory for quicker access, rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
  • ftCreationTime
    Time the file was created. If the underlying file system does not support this time member, ftCreationTime is zero.

  • ftLastAccessTime
    Time the file was last accessed. If the underlying file system does not support this time member, ftLastAccessTime is zero.

  • ftLastWriteTime
    Last time the file was written to.

  • dwVolumeSerialNumber
    Serial number of the volume that contains the file.

  • nFileSizeHigh
    High-order word of the file size.

  • nFileSizeLow
    Low-order word of the file size.

  • nNumberOfLinks
    Number of links to this file. For the FAT file system this member is always 1.

  • nFileIndexHigh
    High-order word of a unique identifier associated with the file.

  • nFileIndexLow
    Low-order word of a unique identifier associated with the file. This identifier and the volume serial number uniquely identify a file. This number may change when the system is restarted or when the file is opened. After a process opens a file, the identifier is constant until the file is closed. An application can use this identifier and the volume serial number to determine whether two handles refer to the same file.

  • dwOID
    Object identifier of the file. This parameter is only valid on files that are stored in the object store. Files on external file systems do not have object identifiers associated with them.

    Note   Versions 2.12 and earlier of Windows CE assigned OIDs to objects in other file systems, such as the FAT file system. These OIDs were guaranteed to be unique within a volume, but not across multiple volumes. Effective with version 3.0, the only file and directory objects that have valid, unique OIDs are in the object store. Database objects, on any file system, have valid, unique OIDs.

Remarks

Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, the object store RAM file system maintains only the last modified time.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Winbase.h.

See Also

GetFileInformationByHandle | FILETIME

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.