🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.nativeapi
Article #221

Re: CopyFile inexplicably fails to work

#221
From: intermedia International Inc
Date: Sat, 24 Jan 2004 17:41
29 lines
1978 bytes
Thank you Peter!
I will look into it right away!

Jean-Rene

"Peter Below (TeamB)" wrote:

> 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: <4012AE2E.CECFF738@intermediainternational.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <401142A3.21F96215@intermediainternational.com> <VA.0000a8e7.00753464@nomail.please>

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-24 09:39:40 PST
Message-ID: <4012AE2E.CECFF738@intermediainternational.com>
Date: Sat, 24 Jan 2004 11:41:02 -0600
From: intermedia International Inc <intermedia@intermediainternational.com>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.delphi.nativeapi
Subject: Re: CopyFile inexplicably fails to work
References: <401142A3.21F96215@intermediainternational.com> <VA.0000a8e7.00753464@nomail.please>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 209.5.247.139
X-Trace: newsgroups.borland.com 1074965677 209.5.247.139 (24 Jan 2004 09:34:37 -0700)
Lines: 30
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail