Re: Close #FNbr



=?Utf-8?B?TG9yaW4=?= <Lorin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
news:B26872EA-FF16-40C3-B09B-8377D6F3EA48@xxxxxxxxxxxxx:

Strange responses before so I will try again since I am having the
same difficulties.

Working in the IDE I run into not being able to ( for example get the
file size using the API ) after I have closed a file Close #lFNbr that
was previously opened with Open sFileName For Binary Access Write Lock
Read Write as #lFNbr.

In order to perform the file size I seem to have to do Reset (close
and flush supposedly). The file size routine I use works just fine on
all other files.
The error message says that the file is in use by another application
which it is not since I just closed the file on the previous line.
Nothing else messes with that file. I just created it then closed it.

Reset closes all other open files and I do not want to do this.
But Rest do finally close it and allows the file size routine and any
other routine work.

Is it something to do with declaring Lock Read Write when I have
created the file?

What is the best way to handle this?

If you say use API Read and Write, then I have to say, I have a
similar problem there too. And there I call FlushBuffers but am still
having a problem accessing the file just written. But let's deal with
the Open For Binary first because I may just have a coding error on
this latter problem.

Any chance this is caused by 'Write Behind Caching' ?

.



Relevant Pages

  • Re: Close #FNbr
    ... The error message says that the file is in use by another application ... Reset closes all other open files and I do not want to do this. ... But Rest do finally close it and allows the file size routine and any ... Is it something to do with declaring Lock Read Write when I have created ...
    (microsoft.public.vb.general.discussion)
  • Close #FNbr
    ... The error message says that the file is in use by another application which ... Reset closes all other open files and I do not want to do this. ... But Rest do finally close it and allows the file size routine and any other ... Is it something to do with declaring Lock Read Write when I have created the ...
    (microsoft.public.vb.general.discussion)
  • [md-accel PATCH 03/19] xor: make xor_blocks a library routine for use with async_tx
    ... The async_tx api tries to use a dma engine for an operation, ... back to an optimized software routine otherwise. ... * Dispatch optimized RAID-5 checksumming functions. ... * You should have received a copy of the GNU General Public License ...
    (Linux-Kernel)
  • Re: Perplexing Problem - Need Help
    ... one of the first/easiest of which is the necessity of having a _DOUBLY_ null-terminated string instead of simply a C-string. ... The routine insures that the string is doubly null terminated. ... you are testing any and every return value of every API call aren't you???? ... No chance of one of these routines that "shouldn't" ever fail but returns an error code that isn't look at kinda' thing. ...
    (microsoft.public.vb.general.discussion)
  • Re: Adding files to an array using Dir
    ... A file the API routine missed was: ... Recursively Search Directories by Using FileSystemObject ...
    (microsoft.public.excel.programming)