 |
SetFileTime Add comment W32 Constants Translate this page |
 |
 |
|
Sets the date and time that a file was created, last accessed, or last modified. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL SetFileTime(
HANDLE hFile, // handle to file
CONST FILETIME *lpCreationTime, // creation time
CONST FILETIME *lpLastAccessTime, // last-access time
CONST FILETIME *lpLastWriteTime // last-write time
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER SetFileTime IN kernel32.dll;
INTEGER hFile,;
STRING @ lpCreationTime,;
STRING @ lpLastAccessTime,;
STRING @ lpLastWriteTime
|
 |
 |
 |
| Parameters: |
 |
hFile
[in] Handle to the file for which to set the dates and times. The file handle must have been created with GENERIC_WRITE access to the file.
lpCreationTime
[in] Pointer to a FILETIME structure that contains the date and time the file was created.
lpLastAccessTime
[in] Pointer to a FILETIME structure that contains the date and time the file was last accessed.
lpLastWriteTime
[in] Pointer to a FILETIME structure that contains the date and time the file was last written to. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
| As I found the VFP function FOPEN() can not create a file handle to be valid for this function, regardless of chosen attributes. So the only way to do it is the Win32 function OpenFile. |
 |
 |
| Word Index links for the SetFileTime : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-07-25 12:00:00 | | Modified: | 2001-11-26 16:02:39 | Visited in last 7 days: 37 |