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?
Asked
Active
Viewed 1,601 times
2 Answers
5
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

David Heffernan
- 601,492
- 42
- 1,072
- 1,490
-
Thanks! This will probably be helpful for me too! I suppose that Will work on DLL's, too? – Andreas Wieland Sep 14 '12 at 07:42
-
@AndreasWieland Yes DLLs should be treated in just the same way by the linker – David Heffernan Sep 14 '12 at 07:47
1
Delphi 7 has built-in support for the SetPEFlags directive, and the constants (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP etc.) are already defined in Windows.pas.
According to JEDI help the directive was introduced in Delphi 6.

dougwoodrow
- 1,111
- 12
- 22