CompareFileTime

The CompareFileTime function compares two 64-bit file times.

LONG CompareFileTime(
  CONST FILETIME *lpFileTime1,  // pointer to first file time
  CONST FILETIME *lpFileTime2   // pointer to second file time
);
 

Parameters

lpFileTime1
Pointer to a FILETIME structure that specifies the first 64-bit file time.
lpFileTime2
Pointer to a FILETIME structure that specifies the second 64-bit file time.

Return Values

The return value is one of the following values:

Value Meaning
–1 First file time is less than second file time.
0 First file time is equal to second file time.
+1 First file time is greater than second file time.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.

See Also

Time Overview, Time Functions, GetFileTime, FILETIME