Re: Read a file locked by another program



On 1 Mar 2006 21:31:47 -0800, "Rajat" <garbagea@xxxxxxxxx> wrote:

I was refering to the FileOpen function in VB.NET.

I tried opening the file as a TextStream.

Both of them failed. Presumably because of the reason you state. The
creating application did not allow it to be shared.

There has to be a way around this because Textpad and even Notepad can
open these files.

If Textpad and Notepad can open it, then the creating process is
allowing shared read access. As Thorsten noted, the problem is your
app is requesting write and/or ~exlusive read~ access when it should
only be requesting read. Normal VB provides this capability, so
presumably .Net does as well, but you need to ask .Net questions in
one of the .Net groups.


-Tom
MVP - Visual Basic
(please post replies to the newsgroup)
.



Relevant Pages

  • Re: Whats the cream of Search Engine Software?
    ... I hope not, since Notepad is really not that useful, there are so many ... free replacements that are much and much better. ... Textpad is not free (ok, ... separate tool. ...
    (alt.internet.search-engines)
  • Re: SS view opens notepad instead of printing to stdout or -O file
    ... Maybe it's something that textpad or some other application did to your ... > As I wrote in my previous message, I have removed the Editor setting, ... No mention of Notepad anywhere except in the list ... > Joe Masters wrote: ...
    (microsoft.public.vstudio.sourcesafe)
  • Re: View source app
    ... I replaced UltraEdir32 by TextPad. ... However, I can't change to Word, Excel or notepad from the Tools/Internet ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: TextPad (was Re: KW/phrase density)
    ... I heard Textpad was better. ... I often kill people who recommend Notepad on sight (virtually that is:- ... > Anyway, yeah it's ok. ... I have already one request for a HTML ...
    (alt.internet.search-engines)