Using Win32 functions in Visual FoxPro Image Gallery
Time
..msdn
CompareFileTime
FileTimeToLocalFileTime
FileTimeToSystemTime
GetFileTime
GetLocalTime
GetSystemTime
GetSystemTimeAdjustment
GetSystemTimeAsFileTime
GetTickCount
GetTimeZoneInformation
LocalFileTimeToFileTime
QueryPerformanceCounter
QueryPerformanceFrequency
SetFileTime
SetTimeZoneInformation
SystemTimeToFileTime
Code examples:
A procedure for setting file times
How to set Creation Date/Time for a folder (WinNT)
Setting the date and time that a file was created
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:
Setting the date and time that a file was created
A procedure for setting file times
How to set Creation Date/Time for a folder (WinNT)
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-25 12:00:00
Modified: 2001-11-26 16:02:39
Visited in last 7 days: 25
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.110.114)
28 sec.Function: 'SetParent'
54 sec.Function: 'ReleaseDC'
1.13 min.Function: 'RegisterServiceProcess'
1.55 min.Function: 'SHBrowseForFolder'
1.78 min.Function: 'SetBkMode'
2 min.Function: 'URLDownloadToCacheFile'
2.22 min.Function: 'SystemParametersInfo'
2.43 min.Function: 'SQLDriverConnect'
2.85 min.Function: 'SetComputerName'
3.45 min.Function: 'SetThreadPriority'
Google
Advertise here!