从编译版本exe中删除类字符串名称 [英] Remove classes string name from compiled release exe

查看:163
本文介绍了从编译版本exe中删除类字符串名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编译我的应用程序项目的发行版本。当我使用二进制编辑器查看我编译的最终exe我可以看到我自己创建的对象的所有类名,例如:TPolygon,TRectangle等,作为exe中的二进制文本数据。

I compile the release version of my application project. When I look with binary editor my compiled final exe i can see all the class name of my own created object, for example : TPolygon, TRectangle, etc..., as binary text data inside the exe.

我如何从exe中删除这些信息。我尝试在dpr中删除禁用RTTI:

How i can remove this information from exe. I try to remove disabling RTTI using in dpr:

{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

但不幸运,任何提示。 / p>

But not luck, any hints.

推荐答案

如果要从可执行文件中删除类名,那么您的应用程序将停止工作。编译到应用程序中的.dfm文件包含类名。运行时流媒体框架需要能够在类注册表中查找这些类,并且没有名称,那么您的表单和其属性无法被流式传输。

If you were to remove class names from the executable, then your application would stop working. The .dfm files that are compiled into your application contain the class names. The runtime streaming framework needs to be able to look those classes up in the class registry and without the names then your forms and their properties could not be streamed.

就像AlexSC所指出的那样,执行 TObject.ClassName 需要在可执行文件中存在类的名称。

On top of that, as AlexSC points out, the implementation of TObject.ClassName requires the names of the classes to be present in the executable file.

这篇关于从编译版本exe中删除类字符串名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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