| | |
C++ File IO Operations
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 3
Reputation:
Solved Threads: 0
I have created one binary file in c that save btree.
File is having huge size around 2GB.
If some one changes this attribute to read only, then b tree is updated incorrectly. And the behavior of code changes.
I need to write a code, so that no can change file's attributes such as read only, hidden, etc. from outside.
Can any one help me?
File is having huge size around 2GB.
If some one changes this attribute to read only, then b tree is updated incorrectly. And the behavior of code changes.
I need to write a code, so that no can change file's attributes such as read only, hidden, etc. from outside.
Can any one help me?
Last edited by namita.mundada; Jan 5th, 2009 at 2:50 am.
•
•
Join Date: Jan 2009
Posts: 3
Reputation:
Solved Threads: 0
Thanks for the reply 
No, Actually one service dumps data to file, and I want when that service is been started, no one can change file attributes.
e.g. Suppose my service is dumping data to file, and same time if any one make that file read only, then service cant write data to it.
So actually it is giving me error.
Did you understand the problem?

No, Actually one service dumps data to file, and I want when that service is been started, no one can change file attributes.
e.g. Suppose my service is dumping data to file, and same time if any one make that file read only, then service cant write data to it.
So actually it is giving me error.
Did you understand the problem?
You could probably use some calls to FindFirstChangeNotification, and WaitForSingleObject api calls. Then whenever your app notices a change to the file.. it automatically changes the permissions back. Though, if you have access to the service that dumps data to the file... why not make the service simply check the file permissions (and if needed, change them....) on the line just before it dumps data to the file?
![]() |
Similar Threads
- file operations in c (C)
- File operations (C)
- File Handling in C (C)
- File Interactions (Python)
- File problem (Basic) (C)
- "File operations in c++" (C++)
Other Threads in the C++ Forum
- Previous Thread: Passing stack to a function
- Next Thread: Insertion sort in c++
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






