| Purpose |
| The GetFileTime function retrieves the date and time that a file was created, last accessed, and last modified. |
| Library | Transcribed by | Date of page | Updated on |
| Kernel32.dll | J.Paris | 21.03.03 |
| Restrictions on use |
| none |
| Declare 32-bit |
|
Declare Function GetFileTime Lib "kernel32.dll" ( ByVal hFile As Integer, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME ) As Integer |
| Required Type definition |
| FILETIME |
| Parameters | |
| hFile | A handle to the file to obtain the creation, last access, and last modification times and dates of. The file must have been opened with at least read-level access. |
| lpCreationTime | Receives the time and date of when the file was created. |
| lpLastAccessTime | Receives the time and date of when the file was last accessed. |
| lpLastWriteTime | Receives the time and date of when the file was last written to or modified. |
| Return value |
|
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. |
| Example |
| File_Date_Time |
| Comments |
| See also |