File Format

RobEmDee

Centurion
Joined
Mar 25, 2003
Messages
130
Location
Richmond, VA
I am working on a standard Windows Forms application which each end-user will run from their local machine. Each 'project' created with my application will use several different types of files (xml, vss, txt, jpg). I would like to create a custom file format for my application in which I can store all of the related files for a single 'project' in one file. Hopefully, this will also disable the user from opening the individual project files in another application. Does anyone have any suggestions for accomplishing this requirement or something similar? Thanks!
 
Have you considered storing each of these items within a class (just as member variable or properties) and using .Net's serialisation routines to persist the class to disk?
 
Thanks for the reply Plausibly. As I have researched this topic thoughout today, using .NET Serialization seems to be the easiset way to fulfill my requirement. A few of the files I would be storing as part of my application's project would be MS Office 2003 files (.xls, .vss). How could I include these files in my custom file type?

PlausiblyDamp said:
Have you considered storing each of these items within a class (just as member variable or properties) and using .Net's serialisation routines to persist the class to disk?
 
I figured it out. I created a byte[] to hold each one of the files in a project for my application inside of one class. I can then serialize and encrypt this one class encapsulating all of the project files for a single project. When I decrypt & deserialize the class, I am able to rewrite the byte[]'s back to their proprietary formats. Cool stuff! Thanks for your input Plausibly.

RobEmDee said:
Thanks for the reply Plausibly. As I have researched this topic thoughout today, using .NET Serialization seems to be the easiset way to fulfill my requirement. A few of the files I would be storing as part of my application's project would be MS Office 2003 files (.xls, .vss). How could I include these files in my custom file type?
 
Back
Top