Microsoft Windows CE 3.0  

GetFileTime

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function retrieves the date and time that a file was created, last accessed, and last modified. A remote application interface (RAPI) version of this function exists, and it is named CeGetFileTime.

BOOL
GetFileTime(
HANDLE
hFile
,
LPFILETIME
lpCreationTime
,
LPFILETIME
lpLastAccessTime
,
LPFILETIME
lpLastWriteTime
);

Parameters

hFile
[in] Handle to the files for which to get dates and times. The file handle must have been created with GENERIC_READ access to the file.
lpCreationTime
[out] Pointer to a FILETIMEstructure to receive the date and time the file was created. This parameter can be NULL if the application does not require this information.
lpLastAccessTime
[out] Pointer to a FILETIMEstructure to receive the date and time the file was last accessed. The last access time includes the last time the file was written to, read from, or, in the case of executable files, run. This parameter can be NULL if the application does not require this information.
lpLastWriteTime
[out] Pointer to a FILETIMEstructure to receive the date and time the file was last written to. This parameter can be NULL if the application does not require this information.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The FAT and NTFS file systems support the file creation, last access, and last write time values. The Windows CE object store returns the same time for all three parameters. In general, file system drivers will vary how they support this function.

The precision of the time for a file in a FAT file system is one second. The time precision for files in other file systems, such as those connected through a network or installed on a peripheral device, depends on the file system but may also be limited by the remote device.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winbase.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CeGetFileTime, GetFileSize, GetLastError, SetFileTime, FILETIME