The file handle must have been created with GENERIC_WRITE access to the file.
I tried to create the handle by using native FOPEN() function with different attributes. It did not work.
You can change any of three file time values or a combination of them. But not all file systems can record creation and last access time and not all file systems record them in the same manner. This way you can set the creation time to be later than its access and modification times.
* * *
In C# version, I use managed FileInfo object instead of accessing file times through the System.Runtime.InteropServices namespace.
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.