IMAGE_FILE_NET_RUN_FROM_SWAP in Delphi XE7

坚强是说给别人听的谎言 提交于 2019-12-12 03:17:08

问题


By writing a portable WIn32 app I want to make sure that all the proper settings are done.

I googled for it and found the compiler IMAGE_FILE_NET_RUN_FROM_SWAP switch.

I tried to include it in my dpr file just like this:

{$SetPEFlags IMAGE_FILE_NET_RUN_FROM_SWAP} // THIS ONE!
{$R *.dres}
{$R *.res}

Anyway Delphi XE7 says

[dcc32 Error] Project1.dpr(330): E2003 Undeclared identifier: 'IMAGE_FILE_NET_RUN_FROM_SWAP'

Anyway by reading Embarcaero wiki it seems the name is fine.

Any suggestion?


回答1:


Just include Winapi.Windows in your uses clause (this is where IMAGE_FILE_NET_RUN_FROM_SWAP is declared):

uses
  Winapi.Windows, ...

{$R *.dres}
{$R *.res}
{$SetPEFlags IMAGE_FILE_NET_RUN_FROM_SWAP}


来源:https://stackoverflow.com/questions/33031583/image-file-net-run-from-swap-in-delphi-xe7

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