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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File-load filter

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Before I have my application load a file (eg.: .JPG file)
I want to check if the file hasnt been replaced by antother file and then renamed into the original file's name.
The Idea is to make a checksum on the data in this file.

Does anybody here have an idea to realise this?

Thanx in advance!
 
Hey Tiger245,

You might want to put the image(s) into a DLL-file. This way nobody can replace/alter the jpg-file(s).
 
If you wish to prevent users from altering or erasing
a file, you can also via WINDOWS. To do this, use START|FIND
to locate your file, click on the icon, then hit FILE|PROPERTIES and click in the "Read Only" box.
A better way is to save the data to a backup disk.
 
Thanx for the help but I think I descriped my problem a little bit wrong.

I have an application.. An own made picture edditor.
No I want to sell this application as a demo version.
So I have a couple of prechoosen pictures that the user can edit. But he is not allowed to replace the images with his own because that way it wouldnt be a demo anymore.
No I thought of making a check on the picture file before the application starts..
on form load --> open picturex.jpg --> check data by comparing this with the original checksum.
If picturex.jpg.checksum = original cecksum
ckecked = true!!
Get the idea a little bit?

Any suggestions are welcome!

Thanx in advance!
 
Why not just check the file Date and Time (use FSO - Microsoft Scripting Runtime)?

Or stick the pictures into a resource file, bypassing the normal loading method, and load them from there in the DEMO version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top