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

可紊 提交于 2019-12-22 08:30:09

问题


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?


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/12414509/how-can-i-force-delphi-7-to-load-the-whole-executable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!