Article View: borland.public.cppbuilder.nativeapi
Article #2103Re: How to effectively modify the last access time of a file
From: JF Jolin
Date: Thu, 05 Apr 2007 14:19
Date: Thu, 05 Apr 2007 14:19
25 lines
1618 bytes
1618 bytes
Hi Mark
I'm using BCB 5.5.1
Some programs can modify that date.
http://msdn2.microsoft.com/en-us/library/ms724933.aspx
For example with Microsoft it is possible to set this parameter to -1 like
SetFileTime( hFile, &fTimeCreate, &fTimeLastAccess, &fTimeLastWrite );
memset(&fTimeLastWrite, 0xFF, sizeof(FILETIME) );
SetFileTime( hFile, &fTimeCreate, &fTimeLastAccess, &fTimeLastWrite );
CloseHandle( hFile );
So the CloseHandle instruction doesn't alter that time.
Another alternative is to modify directly the file system.
But I don't know how ?
__
JF Jolin
Technical Details
Message-ID:
<op.tqbd12qajr09w3@localhost>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!feed10.multikabel.net!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<op.tqajwtlyjr09w3@localhost> <Xns990966E8E657Fkoenhacom@207.105.83.66> <4614eacb@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,69dd2e4db7d54b87 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 05 Apr 2007 10:19:04 -0400 Subject: Re: How to effectively modify the last access time of a file From: "JF Jolin" <jfj@nospam.com> Content-Type: text/plain; charset=iso-8859-15 MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi References: <op.tqajwtlyjr09w3@localhost> <Xns990966E8E657Fkoenhacom@207.105.83.66> <4614eacb@newsgroups.borland.com> Content-Transfer-Encoding: 7bit Message-ID: <op.tqbd12qajr09w3@localhost> User-Agent: Opera Mail/9.02 (Win32) NNTP-Posting-Host: 66.36.144.114 X-Trace: newsgroups.borland.com 1175782730 66.36.144.114 (5 Apr 2007 07:18:50 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!feed10.multikabel.net!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail