We use GetLastInputInfo and calculate the difference from the result of GetTickCount64 to determine idleness. However, the tick count returned by GetLastInputInfo is written into a the member dwTime of LASTINPUTINFO, which is a DWORD and therefore an unsigned 32 bit integer, with a maximum value of and its maximum value of 4294967295, which is equivalent to ~49 days. On machines with uptimes longer than that, this of course leads to the function reporting an incorrect value.
Apparently there is no function called GetLastInputInfo64, but maybe a function under a different name?