Page 1 sur 1
SetFileTime_()
Publié : jeu. 14/oct./2004 19:46
par gansta93
Bonjour,
Est-ce que quelqu'un pourait m'expliquer comment marche cette fonction API svp?
En même temps, si je comprand bien, il me faudra un petit cour sur les structures... mais ça avec un exemple avec mon API ça devrait m'aider à comprendre

.
Merci d'avance.
PS: Si quelqu'un peut me faire aussi pour GetFileTime_(), même si je pense que l'utilisation est la même, ça serait cool!

Publié : jeu. 14/oct./2004 21:32
par nico
Il y a déjà plusieurs post sur le sujet, fait une recherche sur GetFileTime.
Publié : ven. 15/oct./2004 7:53
par gansta93
nico a écrit :Il y a déjà plusieurs post sur le sujet, fait une recherche sur GetFileTime.
C'est à croire que les recherches avec les mêmes mots ne marchent pas pour tout le monde

.
Publié : ven. 15/oct./2004 10:48
par Anonyme2
Tu vas sur le site des code fr (regarde un post du soldat inconnu, le lien est en bas du post) dans la rubrique fichiers/dossiers et ouvre l'exemple Filetime, y a tout quesqui faut sur getfiletime pour pas mourir idiot

Publié : ven. 15/oct./2004 10:57
par gansta93
Et pour SetFileTime,, c'est la même chose?
Publié : ven. 15/oct./2004 11:08
par Anonyme2
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.
Publié : ven. 15/oct./2004 11:28
par gansta93
Arf... chaud.
Publié : ven. 15/oct./2004 11:41
par Anonyme2
tu n'aimes pas la langue anglaise ?
Si t'as des problèmes avec ces API poste tes codes et on verra ce qui cloche.