Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC: How to Hide a text source file inside executable

Status
Not open for further replies.

Irit

Programmer
Aug 21, 2001
9
0
0
US
Hi,
I am writing a program that on start-up reads from a text file some information.
I would like to hide this file, so the user is getting only the exe file, and he cannot mess with the text file (the file has a delicate structure).

I tried to:
* include the file (not working, it still looks for the code file)

Maybe you have an idea how to do this?
Thanks in advance!
Irit
 
If you can pre-process the text from say

[tt][blue]This is a line of text[/blue][/tt]
to
[tt][blue]"This is a line of text\n"[/blue][/tt]

Then you could do this :)
Code:
const char *textfile =
#include "textfile.txt"
;

--
 
Don't forget to make the text in a (reversible) mess before including (invent some sort of a hashing): if you include the text directly, a smart user can view it in your exe file with a simplest hex editor...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top