[fpc-pascal] Resources or alike
Marco van de Voort
marcov at stack.nl
Sun Mar 20 12:46:44 CET 2005
[ Charset UTF-8 unsupported, converting... ]
> Dnia sobota, 19 marca 2005 23:31, Nico Arag?n napisa?:
> > IIRC, you don't even need resources:
> >
> > copy /b program.exe + file.dat combined.exe
> >
> > Then you can open combined.exe from itself, seek to (filelength -
> > sizeofdatafile -1) and use blockread.
>
> Uhmm... I get a Runtime error 026 everytime I try to open the executable for
> reading from within itself. Here's the code:
Known windows problem. Windows lock all .exe's.
Keep in mind that reset is actually read/write.
Try :
- Before the reset, add filemode:=0;
- change the reset to reset(exefile,1); since I doubt you want to access
it in 128 bytes units.
More information about the fpc-pascal
mailing list