Partager via


IRAPISession::CeGetFileTime

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method retrieves the date and time that a file was created, last accessed, and last modified for a file on a remote Windows Embedded CE–based device.

Syntax

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

Parameters

  • hFile
    [in] Handle to the file 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 FILETIME structure to receive the date and time the file was created. This parameter can be NULL.
  • lpLastAccessTime
    [out] Pointer to a FILETIME structure 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.
  • lpLastWriteTime
    [out] Pointer to a FILETIME structure to receive the date and time the file was last written to. This parameter can be NULL.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call IRAPISession::CeGetLastError and IRAPISession::CeRapiGetError.

Remarks

The file allocation table (FAT) and NTFS file systems support the file creation, last access, and last write time values. The Windows Embedded CE object store returns the same creation time value 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

Header rapi2.h
Library ole32.lib, rapiuuid.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IRAPISession
IRAPISession::CeGetFileAttributes
IRAPISession::CeGetFileSize
IRAPISession::CeSetFileTime