[fpc-pascal] Reading from exe directly on RAM
    Marco Alvarado 
    cronodragon at gmail.com
       
    Wed Apr 16 17:41:52 CEST 2008
    
    
  
Hello! I want to read data from my executable files. This data is
appended to the file, and would like to read it directly instead of
loading another copy of the file. I'm think on using a function like
this:
function  PeekExeByte(Byte2Get: Integer): byte;
Begin
  If Byte2Get < 1 then Exit;
  Result := byte(pointer(Hinstance+Byte2Get-1)^);
End;
Should work on Windows, but I'd like to know if you see any problems I
could have with other platforms?
Thanks in advance!
-Marco
    
    
More information about the fpc-pascal
mailing list