Article View: borland.public.delphi.nativeapi
Article #208Re: CopyFile inexplicably fails to work
From: Peter Below (TeamB)
Date: Fri, 23 Jan 2004 18:43
Date: Fri, 23 Jan 2004 18:43
22 lines
1966 bytes
1966 bytes
In article <401142A3.21F96215@intermediainternational.com>, Intermedia International Inc wrote: > Any suggestions about the problem or an avenue for testing/debugging? You are not closing the find handle you get from FindFirstFile. Use Windows.FindClose for that. You are not freeing the memory for the message buffer FormatMessage returns to you. You are making your life unduely difficult by using API routines where there are equivalent Delphi routines (FindFirst, SysErrorMessage). You may want to look at the ShFileOperation API function for the copy operation. It allows you to copy several files in a single call, to use wildcards, and to (optionally) show a progress dialog. -- Peter Below (TeamB) Use the newsgroup archives : http://www.mers.com/searchsite.html http://www.tamaracka.com/search.htm http://groups.google.com http://www.prolix.be
Technical Details
Message-ID:
<VA.0000a8e7.00753464@nomail.please>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<401142A3.21F96215@intermediainternational.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f94dd,89f023344b899a85 X-Google-Attributes: gidf94dd,public X-Google-ArrivalTime: 2004-01-23 11:04:28 PST Date: Fri, 23 Jan 2004 19:43:10 +0100 Newsgroups: borland.public.delphi.nativeapi Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va Organization: TeamB Message-ID: <VA.0000a8e7.00753464@nomail.please> Subject: Re: CopyFile inexplicably fails to work From: "Peter Below (TeamB)" <100113.1101@compuXXserve.com> Reply-To: 100113.1101@compuXXserve.com References: <401142A3.21F96215@intermediainternational.com> NNTP-Posting-Host: 62.226.187.52 X-Trace: newsgroups.borland.com 1074883281 62.226.187.52 (23 Jan 2004 10:41:21 -0700) Lines: 24 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail