Re: file open



"emanshu, Munish Nayyar" <munish.nr@xxxxxxxxx> wrote:

> I an designing an application in C++. i want to open file requested by
> end user but i want to reflect an error to user if file is already
> opened by some other application..
> will anybody tell me that how to know that the file is already open or
> closed..

Basically, you cannot. All you can know is whether _you_ can open this
file. If you cannot, C has no way to tell the difference between a file
that is opened by someone else, a file that you have no rights to, or a
filename that is invalid. Trying to reliably tell the difference would
be hard anyway, on most systems.

Richard
.



Relevant Pages

  • Re: Super Bowl Score Contest
    ... >> No ties....if you are not first to guess a # your guess is invalid. ... Regards, Richard ... Prev by Date: ...
    (alt.smokers.cigars)
  • Help with a Search
    ... I'm designing my search form so that the user checks which field they want ... SELECT CASE optSearchField ... Prev by Date: ...
    (microsoft.public.access.adp.sqlserver)
  • RE: MCP(72-229)
    ... > free sample papers for mcp exam id-72-229 ... > Designing and Implementing SQL server ... Prev by Date: ...
    (microsoft.public.cert.mcdba)
  • Short speaker stands
    ... I'm not sure if this is the best newsgroup for this. ... I'm designing a simple speaker stand. ... If you know any nice looking short, about 40cm high speaker stands, I'd ... Prev by Date: ...
    (rec.audio.pro)
  • Data Access Layer DAL
    ... In designing a web application, what is the significant in creating a ... single DAL vs multiple DAL in a single project. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)

Loading