Archived

This topic is now archived and is closed to further replies.

harryx

Accessing resource files

Recommended Posts

I have a number of text files that I would like to pack into my exe by using custom resources. I have read a number of tutorials on inserting and getting pointers to these resources, but is it possible to use standard file io commands on them (ie get, peek etc). Also is there any way to save data into a resource file, as I havent heard it mentioned I guess the answer is "no". Thanks

Share this post


Link to post
Share on other sites
quote:
Original post by harryx
I have read a number of tutorials on inserting and getting pointers to these resources, but is it possible to use standard file io commands on them (ie get, peek etc).


No. You could roll similar ones of your own to wrap the pointer arithmetic required. There''s some linux code out there - vfileram or something like that, that will provide an idea of how to do that.

quote:
Original post by harryx
Also is there any way to save data into a resource file, as I havent heard it mentioned I guess the answer is "no".


RC_DATA ??? Do you mean to store new data into the exe? You can append new data to the end, but it will likely render the exe inoperable on NT and XP (checksums and filesizes stored in header used by loader).

You might want to look up "virtual file systems". Check out zlib.org and there''s a tut at flipcode on the subject too.

Share this post


Link to post
Share on other sites