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:
How to set Creation Date/Time for a folder (WinNT)
A procedure for setting file times
Setting the date and time that a file was created
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: 37
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 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.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (67.202.9.192)
3 sec.Example: 'Saving HKEY_LOCAL_MACHINE\\Software\\ODBC Registry Entries to an XML file'
12.97 min.
13.03 min.Example: 'Opening the Page Setup dialog box to specify the attributes of a printed page'
13.1 min.Function: 'CryptGenRandom'
Function group: 'Cryptography Reference'
59.82 min.Example: 'Finding out if the current user is the Guest account'
59.88 min.Function: 'Escape'
2.03 hrs.Example: 'Drawing Windows frame controls using the DrawFrameControl function'
 Function: 'GetWindowDC'
Function group: 'Painting and Drawing'
2.89 hrs.Example: 'How to build UDP responder'
 Function: 'sndPlaySound'
Google
Advertise here!