Article View: borland.public.cppbuilder.nativeapi
Article #2245Re: How to effectively modify the last access time of a file
From: Koen
Date: Thu, 05 Apr 2007 09:06
Date: Thu, 05 Apr 2007 09:06
11 lines
1190 bytes
1190 bytes
JF Jolin wrote: > hFile = CreateFile( lpszFileName, GENERIC_READ | GENERIC_WRITE, 0, > NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); > > SetFileTime( hFile, &fTimeCreate, &fTimeLastAccess, &fTimeLastWrite ); > > CloseHandle( hFile ); When I use your code, I the last access time is adjusted correctly. Are you sure you don't open the file elsewhere?
Technical Details
Message-ID:
<Xns990966E8E657Fkoenhacom@207.105.83.66>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<op.tqajwtlyjr09w3@localhost>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,69dd2e4db7d54b87 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to effectively modify the last access time of a file From: Koen <koen@ha.com> References: <op.tqajwtlyjr09w3@localhost> Message-ID: <Xns990966E8E657Fkoenhacom@207.105.83.66> User-Agent: Xnews/5.04.25 NNTP-Posting-Host: 81.246.59.163 Date: 5 Apr 2007 01:06:58 -0800 X-Trace: newsgroups.borland.com 1175760418 81.246.59.163 (5 Apr 2007 01:06:58 -0800) Lines: 12 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail