How to save data from standalone?

Richard Gaskin ambassador at fourthworld.com
Mon Feb 6 14:10:21 EST 2006


Scott Kane wrote:
> Hi Mark,
> 
>> ...all right, technically it *is* possible to do save to an 
>> executable if you pull the right tricks. That's how resource 
>> editors work. Are you saying that an executable can modify 
>> *itself*, though? That would involve fiddling with runtime 
>> permissions at a very deep level, and I'm not at all 
>> convinced you could get away with it.
> 
> See:
> 
> <
> http://www.componentace.com/bde_replacement_database_delphi_absolute_dat
> abase.htm#overview >

I wrote the developer of Absolute DB, and he says:

    RG> I had the impression that EXEs cannot modify themselves
    RG> at runtime -- how does Absolute Database do that?
    Actually, Absolute DB doesn't do that, the database attached
    to .exe can be used in read only mode.

So in that usage it's the same as Rev.

A Microsoft tech note explains one way to modify code in memory, 
prefaced with a note that it's "not recommended":
<http://support.microsoft.com/default.aspx?scid=kb;en-us;127904>

And that's only in memory; I could find no reference from Microsoft on 
how to have an EXE modify itself on disk.

If you search hard enough you can find a few techniques for apps to be 
modified at runtime, but they all step outside the recommendations of 
the OS vendor.

Microsoft says apps shouldn't modify themselves, and Rev merely follows 
suit.

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list