Delphi 2007 : How to Set TSAWARE?

谁说我不能喝 提交于 2019-12-04 04:22:17

My guess is that you are missing the Windows unit from your .dpr file's uses clause. Add that and you will be able to write:

{$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}

in your .dpr file. Although clearly you need to write it after the uses clause.

The $SetPEOptFlags feature was added a few versions before Delphi 2007. And so the error that you are presumably seeing is simply that IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE is not declared. And that is solved by making sure that the symbol is visible in the .dpr file. Clearly you can do that by declaring a constant in the .dpr file, but to avoid duplication I always prefer to add the Windows unit.

compiles under D7

const

IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000;

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