Re: File Copy Without Win Buffering
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Sat, 28 Jan 2006 18:09:41 -0600
"Lorin" <Lorin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9BC8E2AA-E4EE-4624-992E-23B234BDD72A@xxxxxxxxxxxxxxxx
> Need help with a snippet to:
> Copy a file without using Windows buffers - i.e. direct write to
destination.
> I think it goes like this -
> Get the sector size of the source and destination.
> Read sectors to make up a destination sector size.
> Write a destination sector.
> Loop until done.
> Fill the "empty" contents of the last sector with Nulls
> Close the file.
>
> A code snippet would be really helpfull.
>
> I cannot figure out the API calls and parameters that are necessary.
> I can do all of this with regular File System Object etc but canot figure
> out how to do this without Windows buffering getting in the way.
> I want to know that the fle got to the destination device so when I read
it
> back I am getting it from the device not from Windows buffers as I am now.
> I just turned 63 and am so happy to be writing programs - keeps my mind
> greased.
>
If you are trying to do what I think you are trying to do - then the answer
is you can't.
You can read/write to the disk without 'buffering' using the WinAPI but the
last time that really worked was with Win98. All most all the "raw" disk
access (available to VB), in Win2k/XP and higher, is remapped to some
intermediate File I/O and is managed with OS components in their own time
slots. You can achieve the illusion of writing directly to 'low-level'
devices - but it won't actually happen. You need to go to C/C++, the DDK,
and VBXs.
Perhaps, if you explained exactly what you are trying to do and how "Windows
buffering" is "getting in the way" someone could provide a workaround or
better direction.
-ralph
.
- Follow-Ups:
- Re: File Copy Without Win Buffering
- From: Lorin
- Re: File Copy Without Win Buffering
- References:
- File Copy Without Win Buffering
- From: Lorin
- File Copy Without Win Buffering
- Prev by Date: Re: load a 2D array into MSFlexGrid
- Next by Date: Re: RaiseEvent not working (Access 2000, VB6, under Win2K)
- Previous by thread: Re: File Copy Without Win Buffering
- Next by thread: Re: File Copy Without Win Buffering
- Index(es):
Relevant Pages
|