Click here to Skip to main content
15,905,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
1)From what you described as your requirements I'd do A and B, yes.

2)That depends on what you anticipate the reason for the tempering. I'd probably start out with a messagebox to the user if you detect something wrong. something like:

The database appears to have been changed or corrupted since the program was last run. Rebuilding Database, MB_OKCANCEL

This way, the user at least has an option and has been warned that he may have completely screwed things up when he fooled around with your file. As I said, if he's sophisticated and determined enough to set the read-only attribute to false, then edit the file and finally to ignore the warning message you gave him, there isn't much you can do to stop him and there may be a legitimate reason for him to do it so you can only do so much.

3) Yeah, you're right, I think there is some permission thing that XP has. OK fine, don't put it in Windows\System, but I think there's another separate "Application Data" folder somewhere that's been designated for this type of use. You should be able to find a place, just putting the copy in a completely different folder goes a long way to making thngs more secure both from a tampering issue and crash-proofing.

4) I think someone else already answered this, yes there are ways. Personally I wouldn't bother. You mentioned that your data file can get fairly large. Whatever you do to encrypt/decrypt it will cause things to slow down, introduce bugs and will probably have a lot of other drawbacks too. ie. what if YOU want to edit the file to check for bugs, problems during development? If the thing is unreadable you are only making things harder on yourself. On the other hand, if you really really don't want anyone to see what's inside (prevent unwanted reverse engineering for example) then maybe it's worth all the extra time and trouble. This one is really something only you can answer.

Good luck Smile | :)
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 
GeneralRe: Linker Error_ URGENT Pin
ThiagoFragoso5-May-06 10:22
ThiagoFragoso5-May-06 10:22 
QuestionHelp Thread & GetForegroundWindow Pin
Alksindrs5-May-06 6:00
Alksindrs5-May-06 6:00 
AnswerRe: Help Thread & GetForegroundWindow Pin
led mike5-May-06 6:23
led mike5-May-06 6:23 
GeneralRe: Help Thread & GetForegroundWindow Pin
Alksindrs5-May-06 6:42
Alksindrs5-May-06 6:42 

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.