joe_pool_is Posted June 19, 2006 Posted June 19, 2006 How could I guarantee that the multiple images in my C# project are the ones that are supposed to be in there? Our company has an application that is being developed for use in a small, hand held device (palm pilot, etc). The application uses pictures to help the technician troubleshoot problems out in the field and details where to make connections, what bolts to tighten, etc. The company wants to safeguard the images used by the application to ensure no one can tamper with them, since a wrong image could result in injury or death. WiFi is not always available, especially deep in the coal mines or out on off-shore drilling platforms, so connecting to an SQL Server for our images is not the best idea. I tried embedding the images by using an image list, but then I am limited to 256 width by 256 height. We'd like our techs to be able to zoom in on a region if it is necessary. Regards, jp Quote Avoid Sears Home Improvement
Administrators PlausiblyDamp Posted June 19, 2006 Administrators Posted June 19, 2006 You could store them as an embedded resource within the executable. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
joe_pool_is Posted June 19, 2006 Author Posted June 19, 2006 You could store them as an embedded resource within the executable.Sounds like what I want. Could you (or someone) throw me some tips that would let me get started fast with embedded resources? The majority of our products are still Borland creations, so we are a little slow when it comes to Visual Studio. Thanks for your help! Quote Avoid Sears Home Improvement
Leaders snarfblam Posted June 19, 2006 Leaders Posted June 19, 2006 What version (version number and standard/express/professional) of what language(s) are you using? There are lots of tutorials around, but in the newest versions of C# and VB.Net (not sure about C++) there is a designer to generate code to access resources. Quote [sIGPIC]e[/sIGPIC]
joe_pool_is Posted June 19, 2006 Author Posted June 19, 2006 This is on Visual C# 2005 Express. When I tried 'DefaultNamespace.Properties.Resources.ResourceName', I was able to debug down to the fact that the Resources.Designer.cs file had populated itself with [CS]internal static string mylogo { get { return ResourceManager.GetString("mylogo", resourceCulture); } } [/CS]Now, every time I try to delete that resource through the Resource Designer, C# stops responding. Grrrr!! Maybe I should just go home a little early for the day, huh? Quote Avoid Sears Home Improvement
Leaders snarfblam Posted June 20, 2006 Leaders Posted June 20, 2006 Here's a thought. Are you going to need to be able to expand or modify these images between software releases? If so, resources might not be the way to go. Perhaps you could get some cryptography (System.Security.Cryptography) involved. Maybe verify files with a hash or use asymmetrical encryption to make your data tamper-resistant. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.