Answer by John Willemse didn't work for me - it turns out fileTimeUnchanged
had to be set to 0xFFFFFFFFFFFFFFFF
rather than 0xFFFFFFFF
. This is because (according to the docs) you need to pass the FILETIME structure with both DWORDs set to 0xFFFFFFFF
. Passing 0xFFFFFFFF
as the entire structure would give dwLowDateTime the correct value, but dwHighDateTime would be 0
.