Tu as la doc microsoft sur les API ?
Car pour commencer, il faut lire la doc MS sur l'API voulu et seulement après essayer de la programmer.
C'est pratiquement la même chose sachant que d'après la doc, il y a des limitations en fonction des OS
SetFileTime
The SetFileTime function sets the date and time that a file was created, last accessed, or last modified.
BOOL SetFileTime(
HANDLE hFile,
const FILETIME* lpCreationTime,
const FILETIME* lpLastAccessTime,
const FILETIME* lpLastWriteTime
);
Parameters
hFile
[in] Handle to the file for which to set the dates and times. The file handle must have been created with the FILE_WRITE_ATTRIBUTES access right. For more information, see File Security and Access Rights.
lpCreationTime
[in] Pointer to a FILETIME structure that contains the date and time the file was created. This parameter can be NULL if the application does not need to set this information.
lpLastAccessTime
[in] Pointer to a FILETIME structure that contains the date and time the file was last accessed. The last access time includes the last time the file was written to, read from, or (in the case of executable files) run. This parameter can be NULL if the application does not need to set this information.
lpLastWriteTime
[in] Pointer to a FILETIME structure that contains the date and time the file was last written to. This parameter can be NULL if the application does not want to set this information.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on Windows NT FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On NTFS, access time has a resolution of 1 hour. Therefore, the GetFileTime function may not return the same file time information set using SetFileTime. Furthermore, FAT records times on disk in local time. However, NTFS records times on disk in UTC. For more information, see File Times.