I'm making a program and this program will rely on outside files for it's operation. Imagine something like Photoshop. With photoshop you can save out as a .psd and you can open .psd's and you can only open them in Photoshop. My question is not how to make or register a file extension but how do I read my custom file type? How does my main program, like photoshop, read the information inside my file with a custom file extension, like .psd's? I will be needing to get information such as strings, images and audio from the files for use by the main program.
With System.IO you can read the contents of any file. As long as you have the means to decode it you are away laughing.
Including images and audio? How would I get the images and audio embeded into the file into the main program?
Typically images and audio will be serialised into a series of bytes in the file. If you have the deserialisation method you can read out all of the bytes and convert them back to their original form. It is fairly simple if you made the original file yourself. Trickier for someone else's format, but still doable.
Thanks for the tips. Obviously it is .net so can you point me generally to which methods I might use for serialization and reading?