|
-
Jun 22nd, 2006, 04:12 PM
#1
Thread Starter
Lively Member
[02/03] Adding embedded resource in runtime
hey guys,
I know it is possible to embed resources in the design-time, but is it also possible to embed (or change, it'll be a simple textfile) a file programmatically? I'd like to know if this is possible before I start programming as this would change the whole concept of my application. Any help is appreciated!
Thanks in advance,
gtheman
-
Jun 22nd, 2006, 04:21 PM
#2
Lively Member
Re: [02/03] Adding embedded resource in runtime
I don't think you can do that at runtime. It would require re-compiling the application including the new data. I'm not 100% certain, but from my basic knowledge of how resources and compilers work together, I don't think it's possible.
-
Jun 22nd, 2006, 04:45 PM
#3
Thread Starter
Lively Member
Re: [02/03] Adding embedded resource in runtime
Ok... I've been thinking and might have found another solution. Is it possible to add an embedded resource to another project without having visual studio installed, so purely relying on a self-written application which manipulates a project file and the compiler(which is included in the .net framework, or am I wrong?), which recompiles the exe-file with the required files which have been added. Let's hope this is possible (couldn't find anything on google, but that can also rely on the fact that I'm tired and about to go to bed).
Gtheman
By the way: Thanks for the quick reply supertotallyawesome
-
Jun 22nd, 2006, 07:00 PM
#4
Re: [02/03] Adding embedded resource in runtime
The whole point of using resources is so that they are inaccessible from outside the app at run time. If you want to change the contents of a file at run time then you don't want a resource, plain and simple. You would embed a text file as a resource if you were going to use it as a template for files that you were going to create at run time, but you don't change the resource itself. It is possible to use the Framework to compile code at run time but I have no idea how it's done and I guarantee you that it is not something that beginners or probably even intermediate programmers should normally be doing.
-
Jun 22nd, 2006, 07:44 PM
#5
Re: [02/03] Adding embedded resource in runtime
 Originally Posted by jmcilhinney
The whole point of using resources is so that they are inaccessible from outside the app at run time. If you want to change the contents of a file at run time then you don't want a resource, plain and simple. You would embed a text file as a resource if you were going to use it as a template for files that you were going to create at run time, but you don't change the resource itself. It is possible to use the Framework to compile code at run time but I have no idea how it's done and I guarantee you that it is not something that beginners or probably even intermediate programmers should normally be doing.
Very correct, if you are adding them at run-time they cannot be embedded resources (%100 No WAY).
But you might save your data in a table or compress it in a zip file
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 23rd, 2006, 02:24 AM
#6
Thread Starter
Lively Member
Re: [02/03] Adding embedded resource in runtime
So it is not possible that the executable of project a adds an embedded resource to project b(which is not bein used of course) and compiles project b after having added the resource(s)?
Oh Well, I'll somehow find another solution ...
Thanks anyways,
gtheman
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
|