|
-
May 24th, 2001, 04:32 PM
#1
Thread Starter
Hyperactive Member
Store files within EXE ??
What is the best way to embed binary file information into the program while in development mode, so that it gets compiled into the EXE ???
For example: I write a lot of programs that use IO.DLL, and because I'm strange, I prefer to keep the DLL in the install directory of the program and leave it unregistered in the system, which does work. If I wanted to embed that into the EXE so that when the program starts, it checks if the DLL has been corrupted or lost, then will spawn a new one (Open for binary as #1, Put #1.....). This may be a poor example, but I can remember a number of times that I would have liked to embed files in the EXE so that they could be created at will.
Another example would be having large binary arrays for lookup tables without trying to define it with Array(12,65,23,98,34,114,.....). The table could be dumped to a file or possibly read from the containing control.
If you have ever worked with Assembly or Firmware programming, you know that it is relatively easy to store misc. raw data into the program and read it from memory as a reference. I guess this is sort of what I was looking for.
I don’t know what would happen if you cut/paste the data to a hidden text box of a form while in the IDE - I haven’t tried it yet, but I would assume that there would be a problem reading back the binary information from the textbox and get it byte for byte perfect.
Has anyone tried this before ?? Is there a control that could work as a PictureBox for binary data ?? (Actually come to think of it, I guess you could create a bitmap with the pixels representing the binary data of a file, and use a PictureBox)
Any ideas on a clean way to do this ??? What ever the solution, I would like to be able to access the data from code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|