start partial binary

Lionello Lunesu lionello at lunesu.remove.com
Wed Mar 12 21:28:26 PDT 2008


On DOS, Windows9x I did this very often:

* build the exe, note its final size;
* keep this exe size in some global constant;
* rebuild the exe, make sure the size is the same;
* append other data to the exe (DOS: copy /b foo.exe+my.dat final.exe)

In code you can then simply open the exe as any other file and skip to the 
actual data.

I'm not 100% sure whether this trick still works on XP+ or linux, but I 
think it should work, with the right combination of file-open/sharding 
rights.

L.

----- Original Message ----- 
From: "Moritz Warning" <moritzwarning at _nospam_web.de>
Newsgroups: digitalmars.D
Sent: Thursday, March 13, 2008 7:21 AM
Subject: start partial binary


>I like to put some data into a binary
> that should reside on disk even when the program
> is started.
>
> The data should be loaded in memory on request of the running part.
>
> The aim is to get rid of zip file distributions:
> - need to be extracted
> - files need to be keep together
>
> Is that possible with D? 




More information about the Digitalmars-d mailing list