473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Editing embeded resource after compilation - C#

ok, so ive built a simple console interpretor in C#.

Now it works all how I want it to, but here what the users gets after IDE encrypts files:

=<app dir>
==users_app.exe
==app_code.txt

What I want is this:

=<app dir>
==users_app.exe

Only app.exe! I know how to embed resources and such, but I need to be able to read them and edit them, but the files only need to be edited after the file is compiled form program.cs to program.exe.

What I would prefer is something like:

Expand|Select|Wrap|Line Numbers
  1. string DATA;
  2.  
  3. DATA = read_resource("data.txt");
  4. if (DATA=="")
  5. {
  6. string DATA2;
  7. //read data from externel "data.txt" file
  8. Write_resource("data.txt",DATA2);
  9. }else{
  10. interpret_code(DATA);
  11. }
  12.  
Although im willing to do watever is neccecary.

The idea is this:

---User write code.
---IDE saves it as "data.txt"
---IDE copies "runner.exe" to "users_app.exe"
---IDE encrypts "data.txt"
---IDE executes "users_app.exe"
---"users_app.exe" checks if rsource file is empty, if so copies the data from "data.exe" into resource file, if not, interprets it.
---IDE removes temporary "data.txt"
--user is left with a single EXE file that has interpreted code embeded in it.


Is this possible? Or will I have to write my own code that write to the exe in binary mode and the EXE reads it?



Thanks,


~Mini12321
Mar 2 '08 #1
0 1064

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ed Sutton | last post by:
I have been searching for how to get an icon resource and load it into an ImageList. I added an *.ico file to my project and set the files "Build Action" to "Embedded Resource". Is there any easy...
2
by: Ed Sutton | last post by:
What's the trick to loading an icon from the embedded resources? Here are the steps I have taken: ------------------------- 1 - I added a file named "FOLDER01.ICO" to my solution project 2 - I...
3
by: Viorel Ghilas | last post by:
Hi all, I have an assembly, that contain some embeded resources, How can I add in runtime, data to my embeded resources. is it posible with best regard Viorel Ghilas
0
by: OleOj | last post by:
In the Beta 2 of Visual Studio I have tried to create a custom resource provider. It works perfectly when I run the application, but when I load the control in desing mode I get an Error 1...
5
by: Martin Bischoff | last post by:
Hi, is it possible to implement custom resource managers for ASP.NET 2.0 so that strings can be read from a database (for example)? Ideally, it should be possible to configure the custom...
4
by: Jason Pettys | last post by:
In an ASP.NET project I am setting the content type of my .ascx and ..aspx files to Embedded Resource for a separate reason. When I do this they get embedded as "RootNamespace.Filename" but I...
0
by: alf | last post by:
Hi, I want to use resource to keep all user interfaces text and give a page to the user to edit this resource. The page could be a datagrid bind to the XML resource file. I'm thinking in...
0
by: Pitaridis Aristotelis | last post by:
I know how to extract an embeded resource from a file but does anyone how to import an embeded resource to a file?
3
by: =?Utf-8?B?TGV4?= | last post by:
I have a standard MFC application, every now and then, probably after editing resources or classes it changes the #included statement in the .RC file from resource.h to reasource. I then have to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.