How to stop a program from accessing the file system

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 8
Reputation: gogoc is an unknown quantity at this point 
Solved Threads: 0
gogoc gogoc is offline Offline
Newbie Poster

How to stop a program from accessing the file system

 
0
  #1
May 19th, 2008
I don't want my programs to access the file system at all
means no file creation, no deletion not even the a single stream for accessing files.
how can i do that
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 1,871
Reputation: twomers has a spectacular aura about twomers has a spectacular aura about twomers has a spectacular aura about 
Solved Threads: 56
twomers's Avatar
twomers twomers is offline Offline
Posting Virtuoso

Re: How to stop a program from accessing the file system

 
0
  #2
May 19th, 2008
  1. //#include <fstream>
I blag!?
"Mr Kitty, you have to live in the attic now. Here, write a diary."
I am the Walrus!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,442
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1474
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: How to stop a program from accessing the file system

 
0
  #3
May 19th, 2008
Then don't do that Don't put any code in the program that accesses the file system. Simple.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 8
Reputation: gogoc is an unknown quantity at this point 
Solved Threads: 0
gogoc gogoc is offline Offline
Newbie Poster

Re: How to stop a program from accessing the file system

 
0
  #4
May 19th, 2008
Originally Posted by Ancient Dragon View Post
Then don't do that Don't put any code in the program that accesses the file system. Simple.
actually i am expecting that code from some one else so i am not sure about that
any ways i can make some changes to the code before compiling.
i use windows xp but i can migrate to ubuntu if u want me to use linux.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,442
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1474
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: How to stop a program from accessing the file system

 
0
  #5
May 19th, 2008
>>i use windows xp but i can migrate to ubuntu if u want me to use linux.
why would I care if you use *nix or Windows ?

Since you have the source code then change it to comment out all the file i/o stuff. Start by commenting out #include <fstream> . When you compile you might get a whole bunch of errors. Go through the error messages one at a time and comment out or delete the offending line(s).

That could amount to a huge chore, depending on the program. What are you going to do with the section(s) of the code that depend on the data that is read and/or written to the file system?
Last edited by Ancient Dragon; May 19th, 2008 at 2:44 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,953
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: How to stop a program from accessing the file system

 
0
  #6
May 19th, 2008
Actually, he's talking about preventing someone else's program from accessing the file system.

Check out your answer over at CodeGuru.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC