[ 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.
 

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to