Article

What’s the highest legal FILETIME? Is it safe to use?

The Old New Thing ·The Old New Thing ·Published 2026-09-21 ·5 min read

This article discusses the challenges of defining a sentinel FILETIME value that is always considered later than any other FILETIME. It explores the implications of using maximum values and the special meanings associated with certain FILETIME values in various functions.

From the article

A customer wanted to define a sentinel FILETIME that will be considered larger than another FILETIME . In other words, Compare­File­Time should always say that the sentinel value is later. What’s a good value to use?

Strictly according to the definition, the FILETIME consists of ticks since January 1, 1601, and it is an unsigned value, so the highest value is presumably 0xFFFFFFFF`FFFFFFFF .

On the other hand, the documentation for FILETIME itself notes that some functions consider the value 0xFFFFFFFF`FFFFFFFF to have special meaning. For example, the Set­File­Time function treats that value as meaning “Do not update the time for this handle.”


Share this resource


Discovered 2026-09-23 Source The Old New Thing Archive 2026-09 →