🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16421

Re: File Copy Operation

#16421
From: Remy Lebeau (TeamB)
Date: Thu, 15 May 2003 16:50
24 lines
2135 bytes
"Muhammad Momin Rashid" <momin@hotmail.com> wrote in message
news:3ec3bff7@newsgroups.borland.com...

> No, this is a normal file copy operation

That wasn't the question.  Which OS are you using?  When using NTFS under
NT/2K/XP, files can be compressed inside the file system itself.
Application code never has to deal with that directly, as the OS handles the
compression/decompression internally.  However, if you are actually reading
the file data, and the file is compressed, then of course the OS will have
to decompress the data before giving it to you.  That might be a costly
operation depending on what you're actually doing.

> I thought when you try to read a part of a file and error
> occurs, the read function just quits and returns the number
> of bytes read.

Only if you are using overlapped I/O, which the VCL does not.  Otherwise,
ReadFile() waits for all of the requested bytes to be read in full, or else
fails the entire operation.


Gambit
Technical Details
Message-ID: <3ec3c804$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!uunet!sac.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ec35dd4@newsgroups.borland.com> <VA.00001cc9.007db8e9@email.address.sorry> <3ec3bff7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2c3eb0c8d9515a68
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-15 10:05:44 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ec35dd4@newsgroups.borland.com> <VA.00001cc9.007db8e9@email.address.sorry> <3ec3bff7@newsgroups.borland.com>
Subject: Re: File Copy Operation
Date: Thu, 15 May 2003 09:50:44 -0700
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3ec3c804$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053018116 207.175.226.26 (15 May 2003 10:01:56 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!uunet!sac.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail