Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CompareFileTime function

Compares two file times.

Syntax


LONG WINAPI CompareFileTime(
  _In_ const FILETIME *lpFileTime1,
  _In_ const FILETIME *lpFileTime2
);

Parameters

lpFileTime1 [in]

A pointer to a FILETIME structure that specifies the first file time.

lpFileTime2 [in]

A pointer to a FILETIME structure that specifies the second file time.

Return value

The return value is one of the following values.

Return valueDescription
-1

First file time is earlier than second file time.

0

First file time is equal to second file time.

1

First file time is later than second file time.

 

Requirements

Minimum supported client

Windows XP [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

FileAPI.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

GetFileTime
File Times
FILETIME
Time Functions

 

 

Show:
© 2017 Microsoft