Delphi XE7中的IMAGE_FILE_NET_RUN_FROM_SWAP [英] IMAGE_FILE_NET_RUN_FROM_SWAP in Delphi XE7

查看:115
本文介绍了Delphi XE7中的IMAGE_FILE_NET_RUN_FROM_SWAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过编写便携式WIn32应用程序,我要确保完成所有正确的设置.

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

我用它搜索了一下,找到了编译器IMAGE_FILE_NET_RUN_FROM_SWAP开关.

I googled for it and found the compiler IMAGE_FILE_NET_RUN_FROM_SWAP switch.

我试图像这样将其包含在我的dpr文件中:

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}

无论如何,Delphi XE7说

Anyway Delphi XE7 says

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

无论如何,通过阅读 Embarcaero Wiki 这个名字很好.

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

有什么建议吗?

推荐答案

只需在您的using子句中包含Winapi.Windows(这是声明IMAGE_FILE_NET_RUN_FROM_SWAP的位置):

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}

这篇关于Delphi XE7中的IMAGE_FILE_NET_RUN_FROM_SWAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆