Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Read only access on an already open file

Reply
Thread Tools

Read only access on an already open file

 
 
elitecodex
Guest
Posts: n/a
 
      11-04-2005
Hello everyone.

I want to know the best way to accomplish this particular situation.

I have a C++ application that has a file open for write access
constantly and it is always updating the information in the file (
maybe once a second or so ). That isnt the problem

I want to have a second seperate application (written in PHP or Java,
but thats irrelavent) that _only_ reads the information in the file.
So it will open it for read access only, read it in, and close it.

I know that things don't really work well when files already have open
handles on them, so i was wondering what the input was regarding this.
Im sure this has to be done somewhere as I dont think its revolutionary
Just escapes me as to what to do.

Thanks everyone!

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      11-04-2005
elitecodex wrote:
> I want to know the best way to accomplish this particular situation.
>
> I have a C++ application that has a file open for write access
> constantly and it is always updating the information in the file (
> maybe once a second or so ). That isnt the problem


OK

> I want to have a second seperate application (written in PHP or Java,
> but thats irrelavent)


Relevant enough to make your question OT...

> that _only_ reads the information in the file.
> So it will open it for read access only, read it in, and close it.
>
> I know that things don't really work well when files already have open
> handles on them, so i was wondering what the input was regarding this.


Post to the newsgroup that deals with your OS. File access across
processes, locking, rights, exclusiveness, etc., are all features of your
OS, not of the language.

> Im sure this has to be done somewhere as I dont think its revolutionary
> Just escapes me as to what to do.


That's simple: find a better place to ask your OS-specific question.

V
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Read dbf file as read only Ricardo Aráoz Python 0 08-26-2008 01:56 PM
Database file and folder are not read only but error message says it is read only?? keithb ASP .Net 2 06-07-2006 03:40 PM
will it cause any problems to open a read-only file & not close it? Sara Khalatbari Python 6 03-16-2005 06:12 PM
How to Redirect to Another Already Open Page (Managing Multiple Open Pages in ASP.Net) TC ASP .Net 3 12-07-2004 07:10 AM
Open page in an already open frame - works in ie but not in Mozilla geefypants Javascript 0 10-28-2004 10:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57