Re: Open append text files for update simultaneously

Tech-Archive recommends: Speed Up your PC by fixing your registry



You have bigger problems with deleting things inside a file. In VB6, the
file I/O do not provide a mechanism to make the file shorter. So if you
delete a line in the middle, you can't make the file smaller.

Also, VB6 does not expose the file handle, so you can't use Windows API.

You could use the Windows API instead. The API function that truncates a
file to the current position is SetEndOfFile. You first There are many who
made a wrapper for the File API, so you don't have to make your own.

Perhaps if you explain further why you need this, maybe we could have other
suggestions that you may have overlooked. It seems that what you need is a
database, like MS Access DB, or SQL Server. You don't have to install MS
Access in order to use an Access DB, the DB driver comes with Windows and
can be updated by a setup package, or downloaded from the web.



<chook.harel@xxxxxxxxx> wrote in message
news:1129106817.318599.109680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Ok, but what if the reading mechanisem should delete what it read from
> the file
> that means I read the first record, deletes it from the file and saves
> it.
> Is that easy to do ? Is it possible ?
> and what if there are many proccess trying to write to the file (even
> if they wait and gets to it after 5 seconds)
> How can I make sure the reading will be in higher priority then the
> writing?
>


.



Relevant Pages

  • Re: Long live Classic!
    ... then you build DLLs in vb6 which your VB6 ... Under the hood, everything is windows API. ... now) and excluding comments and white space, I have 43,363 lines of code. ...
    (microsoft.public.vb.general.discussion)
  • Re: Learn API or VB.Net instead
    ... My recommendation would be to ... Dot net does not ... regularly with vb6 or dot net. ... Dot net does interact with windows API ...
    (microsoft.public.vb.winapi)
  • Re: INI file
    ... practically the identical fashion you did under VB6. ... Just declare the ... Check the MSDN on how to call Windows API functions in VB.Net, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: win api wrapper
    ... >I was wondering if anyon knew of a windows api wrapper that can be used with ... That's a bit of a broad question since VB6 is itself essentially a ... wrapper for the Windows API. ...
    (microsoft.public.vb.winapi)