Files
vmprotect/help/en/script_events.htm
Cmake 195f02a41d dogprotect: VMProtect → DogProtect 全量改名 + VM 节名改 .dog
- 产品名/展示串、SDK 与运行时导出 API、.NET 命名空间全部换为 DogProtect
- 文件与目录改名: dogprotect.sln / DogProtect/ / DogProtectCon/ / sdk/DogProtect.SDK /
  sdk/DogProtectSDK.{h,pas,bas,inc} / runtime/DogProtect.Runtime/ / core/dogprotect.rc /
  app/dogprotect_gui.app
- 项目文件扩展名 .vmp → .dog(含 GUI 过滤器、默认输出名、示例工程、单测)
- VM 代码节名默认 .dog(上游为随机 ".xyz"),产物节为 .dog0/.dog1/...
- 授权数据与配置: DogProtect.dat / DogProtectLicense.ini / Global\\DogProtect.dat
- 域名占位 dogprotect.example,bundle id com.dogprotect.dogprotect
- 保留 VMP_* 内部宏与 third-party/
- BUILD-LINUX.md 增补改名说明与 SDK 兼容性提示
2026-11-23 16:15:28 +08:00

61 lines
2.9 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="Stylesheet" type="text/css" href="default.css" />
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8" />
<title>Events</title>
</head>
<body>
<h1>Events</h1>
<p>The built in script language is an efficient way to automate creation of protected applications with DogProtect. Procedures and functions required at various stages of building the protected file are invoked in certain events processed by the DogProtect core. You can set your own handlers for 5 events that are called by the DogProtect core in the following order:</p>
<ul>
<li><a href="#OnBeforeCompilation">OnBeforeCompilation</a></li>
<li><a href="#OnBeforeSaveFile">OnBeforeSaveFile</a></li>
<li><a href="#OnBeforePackFile">OnBeforePackFile</a></li>
<li><a href="#OnAfterSaveFile">OnAfterSaveFile</a></li>
<li><a href="#OnAfterCompilation">OnAfterCompilation</a></li>
</ul>
<a name="OnBeforeCompilation" /><pre class="code">function OnBeforeCompilation()
end</pre>
<p>This event is invoked when the list of protection objects is created. In the OnBeforeCompilation handler, you can add new procedures to the project, or modify or delete already existing ones.</p>
<a name="OnBeforeSaveFile" /><pre class="code">function OnBeforeSaveFile()
end</pre>
<p>The event is invoked before all objects created during compilation are written to the output file. In the OnBeforeSaveFile event handler you can change the file and its properties (such as the list of resources, the list of exported function, section names etc.) that are automatically written to the output file.</p>
<a name="OnBeforePackFile" /><pre class="code">function OnBeforePackFile()
end</pre>
<p>The event is invoked before packing the protected file of the application. With OnBeforePackFile you can modify a file that is to be packed. This event is only invoked is the "Pack output file" option is enabled.</p>
<a name="OnAfterSaveFile" /><pre class="code">function OnAfterSaveFile()
end</pre>
<p>This event is invoked after writing all objects created during compilation to the output file. The event handler can add new data to the output file or change previously written ones.</p>
<a name="OnAfterCompilation" /><pre class="code">function OnAfterCompilation()
end</pre>
<p>The even is invoked after compiling all objects of the project. At this stage a user has access to the compiled project, and can perform any actions with it, like adding a digital sign (certificate).</p><br/>
<p>When writing even handlers you can create your own procedures and functions. Event names are displayed with a bold font in the script editor.</p><br />
<br />
<br />
<br />
<br />
<hr noshade="noshade" size="1" />
<div align="center">
</div>
</body>
</html>