Corey
11-04-2003, 08:46 PM
Ok further to the issue raised here recently about protecting the integrity of your application's images one solution is to use a file size check to exit the application if the images don't match. This can be made as simple or complex as you like. You can store your values in a table, etc... Here's a very simple example.
result = File.GetSize(_SourceFolder.."\\AutoPlay\\Images\\test.bmp");
if result ~= 921624 then
Application.Exit();
end
Edit the value "test.bmp" to be your image file name and edit the number 921624 to reflect the file size number returned by AMS for your image. If you can't figure this value out run this code to get it by changing "test.bmp" to your file name.
result = File.GetSize(_SourceFolder.."\\AutoPlay\\Images\\test.bmp");
Dialog.Message("Image Size", result);
I suspect this method is surprisingly effective for evading small time swappers. If you setup a table with your values and a function for validation you could manage any size project. (a tool to batch write image folder content values to an importable text flie would be cool and could easily be built using AMS)
For large projects don't verify all images on startup, simply verify them on a per-page basis. Using a function to do this makes it compact and quick. Just an idea...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
result = File.GetSize(_SourceFolder.."\\AutoPlay\\Images\\test.bmp");
if result ~= 921624 then
Application.Exit();
end
Edit the value "test.bmp" to be your image file name and edit the number 921624 to reflect the file size number returned by AMS for your image. If you can't figure this value out run this code to get it by changing "test.bmp" to your file name.
result = File.GetSize(_SourceFolder.."\\AutoPlay\\Images\\test.bmp");
Dialog.Message("Image Size", result);
I suspect this method is surprisingly effective for evading small time swappers. If you setup a table with your values and a function for validation you could manage any size project. (a tool to batch write image folder content values to an importable text flie would be cool and could easily be built using AMS)
For large projects don't verify all images on startup, simply verify them on a per-page basis. Using a function to do this makes it compact and quick. Just an idea...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)