Click here to Skip to main content
15,904,156 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hiding a data file from users Pin
Maxwell Chen5-May-06 19:12
Maxwell Chen5-May-06 19:12 
GeneralRe: Hiding a data file from users Pin
Hamid_RT5-May-06 19:22
Hamid_RT5-May-06 19:22 
GeneralRe: Hiding a data file from users Pin
Maxwell Chen5-May-06 19:29
Maxwell Chen5-May-06 19:29 
GeneralRe: Hiding a data file from users Pin
Hamid_RT5-May-06 19:40
Hamid_RT5-May-06 19:40 
GeneralRe: Hiding a data file from users Pin
Maxwell Chen5-May-06 20:00
Maxwell Chen5-May-06 20:00 
GeneralRe: Hiding a data file from users Pin
Hamid_RT5-May-06 20:12
Hamid_RT5-May-06 20:12 
GeneralRe: Hiding a data file from users Pin
Maxwell Chen5-May-06 20:16
Maxwell Chen5-May-06 20:16 
AnswerRe: Hiding a data file from users Pin
led mike5-May-06 20:55
led mike5-May-06 20:55 
chasetoys wrote:
someway of locking the file from the user?


Sure there are potentially many ways to do that. While I would not advocate using any of them I can discuss it.

One technique would be to use a Database type design for your application. You would build a Windows Service to do all the file IO and use IPC to communicate between the application and the Service. This way the Service is always running and has the file opened without sharing so no other process can access it. Of course the user can always stop the service and then access the file.

The user does control the computer and if they know how the can access the file regardless of what you might do. About all you can do is make it harder for them. Of course doing that makes it harder to develop the application since more work must go into it. More analysis, design, testing, maintenance, support etc.

You might want to reconsider and stick with hidden folder and file attributes.




"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum

led mike
GeneralRe: Hiding a data file from users Pin
Phil C5-May-06 21:43
Phil C5-May-06 21:43 
GeneralRe: Hiding a data file from users Pin
chasetoys5-May-06 22:19
chasetoys5-May-06 22:19 
AnswerRe: Hiding a data file from users Pin
Maxwell Chen5-May-06 22:30
Maxwell Chen5-May-06 22:30 
GeneralRe: Hiding a data file from users Pin
Phil C6-May-06 6:45
Phil C6-May-06 6:45 
AnswerRe: Hiding a data file from users Pin
cmk6-May-06 7:45
cmk6-May-06 7:45 
QuestionGraphical Popup Dialog Pin
Mani.M5-May-06 8:08
Mani.M5-May-06 8:08 
AnswerRe: Graphical Popup Dialog Pin
Cedric Moonen5-May-06 8:31
Cedric Moonen5-May-06 8:31 
QuestionBits of a Bitmap Pin
torNAdE5-May-06 6:51
torNAdE5-May-06 6:51 
AnswerRe: Bits of a Bitmap Pin
Chris Losinger5-May-06 8:20
professionalChris Losinger5-May-06 8:20 
AnswerRe: Bits of a Bitmap Pin
Hamid_RT5-May-06 21:04
Hamid_RT5-May-06 21:04 
QuestionLinker Error_ URGENT Pin
ThiagoFragoso5-May-06 6:23
ThiagoFragoso5-May-06 6:23 
AnswerRe: Linker Error_ URGENT Pin
led mike5-May-06 6:27
led mike5-May-06 6:27 
GeneralRe: Linker Error_ URGENT Pin
ThiagoFragoso5-May-06 6:58
ThiagoFragoso5-May-06 6:58 
GeneralRe: Linker Error_ URGENT Pin
led mike5-May-06 8:05
led mike5-May-06 8:05 
GeneralRe: Linker Error_ URGENT Pin
David Crow5-May-06 8:18
David Crow5-May-06 8:18 
GeneralRe: Linker Error_ URGENT Pin
Jörgen Sigvardsson5-May-06 10:58
Jörgen Sigvardsson5-May-06 10:58 
AnswerRe: Linker Error_ URGENT Pin
Michał Zalewski5-May-06 6:54
Michał Zalewski5-May-06 6:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.