Article View: borland.public.cppbuilder.nativeapi
Article #865Re: Cannot retrieve file date
From: Jos�
Date: Wed, 02 Jan 2008 21:37
Date: Wed, 02 Jan 2008 21:37
23 lines
1828 bytes
1828 bytes
On Wed, 2 Jan 2008 13:02:06 -0800, "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote in borland.public.cppbuilder.nativeapi: >> What went wrong? > >You cannot pass a C runtime FILE* handle to a Win32 API function. You need >to use the Win32 API CreateFile() function instead of the C runtime fopen() >function. > >> The file exists, han1 is not zero and the file can be read. >> But GetFileTime returns an error. > >Because you are not passing a valid Win32 API file handle to it. The help file only says that a handle must be passed, so it's obvious to use fopen(). Anyhow, CreateFile() won't do, I want to know the time of an existing file. It is usually not very useful to create a file and obtain the date immediately afterwards. My only current solution is findfirst() . This also returns the date of a file. -- Jos�
Technical Details
Message-ID:
<5p0on3lb068m6ob82jeg8565fmt5e2fsh4@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.68.MISMATCH!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<hfonn3l8o175ht0j11i9d4q5msanpr6apt@4ax.com> <477bfc32$3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4011bf1b28cc5925 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII From: Jos� <jose@127.0.0.1> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Cannot retrieve file date Date: Wed, 02 Jan 2008 22:37:35 +0100 Message-ID: <5p0on3lb068m6ob82jeg8565fmt5e2fsh4@4ax.com> References: <hfonn3l8o175ht0j11i9d4q5msanpr6apt@4ax.com> <477bfc32$3@newsgroups.borland.com> X-Newsreader: Forte Agent 4.2/32.1117 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 82.75.73.146 X-Trace: newsgroups.borland.com 1199309929 82.75.73.146 (2 Jan 2008 13:38:49 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.68.MISMATCH!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail