Search code examples
delphidelphi-7

How can I force Delphi 7 to load the whole executable?


This is almost a clone of the same question for Delphi 2006, but I'd like a solution for Delphi 7. I'm also getting the External Exception C0000006. Is it possible to make a Delphi 7 load all the executable in memory?


Solution

  • You'll need add a post-built action to whatever build automation you are using. Find an external tool that modifies the PE flags of an executable and call that from your build script. Obviously this must happen after the executable has been built.

    I would recommend using editbin from the MS toolchain. You can get this installed as part of the Windows SDK.

    The commend will look like this:

    editbin /SWAPRUN:NET|CD yourexefile.exe