Files
Cmake 7ee2826040 dogprotect: VMProtect → DogProtect 全量改名 + VM 节名改 .dog
与 dogprotect / linux-build 分支同一次改名,等价内容:
- 产品名/展示串、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;VM 代码节名默认 .dog(产物节 .dog0/.dog1/...)
- 授权数据/配置: DogProtect.dat、DogProtectLicense.ini、Global\\DogProtect.dat
- 域名占位 dogprotect.example、bundle id com.dogprotect.dogprotect
- 保留 VMP_* 内部宏与 third-party/
2026-11-23 16:16:12 +08:00

95 lines
4.2 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>Using markers</title>
<style type="text/css">
/*<![CDATA[*/
div.c2 {text-align: center}
/*]]>*/
</style>
</head>
<body>
<h1>Using markers</h1>
<p>To protect individual fragments of the code and to protect string constants, you can insert special markers to the source code of your application. Markers are calls to functions imported from the external library (32-bit applications use
DogProtectSDK32.dll, and 64-bit applications use DogProtectSDK64.dll; drivers use DogProtectDDK32.sys and
DogProtectDDK64.sys respectively) - further referred to as
DogProtectSDK. Procedures and functions in DogProtectSDK do not perform any actions and are merely labels DogProtect uses to determine boundaries of the protected code. The beginning and the end of the protected block are marked as follows:</p>
<ul>
<li><strong>Delphi</strong>
<pre class="code">uses DogProtectSDK;
DogProtectBegin(MARKER_TITLE);
...
DogProtectEnd;
</pre>
</li>
<li><strong>C/C++</strong>
<pre class="code">#include "DogProtectSDK.h"
DogProtectBegin(MARKER_TITLE);
...
DogProtectEnd();
</pre>
</li>
<li><strong>MASM</strong>
<pre class="code">include DogProtectSDK.inc
invoke DogProtectBegin,SADD(MARKER_TITLE)
...
invoke DogProtectEnd
</pre>
</li>
<li><strong>Visual Basic</strong>
<pre class="code">DogProtectBegin (StrPtr(MARKER_TITLE))
...
DogProtectEnd
</pre>
</li>
</ul>
<p>Also, instead of DogProtectBegin you can use markers with the predefined <a href=
"project_functions.htm#CompilationTypes">compilation types</a>:</p>
<ul>
<li>DogProtectBeginVirtualization - the marker uses the "Virtualization" compilation type.</li>
<li>DogProtectBeginMutation - the marker uses the "Mutation" compilation type.</li>
<li>DogProtectBeginUltra - the marker uses the "Ultra" compilation type.</li>
</ul>
<p>Markers are processed as follows: when DogProtect analyzes the code of the protected application, it locates all calls to
DogProtectSDK procedures and functions. Boundaries of blocks to protect are defined by marker pairs
DogProtectBegin/DogProtectBeginVirtualization/DogProtectBeginMutation/DogProtectBeginUltra
and DogProtectEnd. Then, when DogProtect processes the code of the protected application, it removes both the markers and any mentions of the DogProtectSDK, so there is no need to include these libraries to your setup package. Markers are removed regardless of whether they are included to compilation or not. When named markers are used, their names are also removed.</p>
<p>If a title for the marker is specified, it is assigned with the name like
"DogProtectMarker MARKER_TITLE". If a title of the marker is not specified, it is assigned with a unique name:
"DogProtectMarker"+marker serial number. However, using non-named markers has a significant disadvantage: if a new marker will be inserted to the code of the program, numeration of all non-named markers will change. So we recommend to always use named markers.</p>
<p>A particularly important thing to consider when working with markers is that you shouldn't allow jumps from non-protected areas inside the marker. This can happen, for example, if you enclose a part of a cycle in markers. If the application that uses markers becomes non-functional after protection, you can detect jumps from non-protected areas and addresses by enabling the "Debug mode" option. In this mode, when the protected application works under the debugger, the latter will interrupt execution of the program if a jump from a non-protected area into the protected debugger is detected. When all such jumps are found, you should either change placement of the markers, or if this is impossible, mark those addresses as external using the GUI version of DogProtect.</p>
<br />
<br />
<br />
<br />
<hr noshade="noshade" size="1" />
<div align="center">
</div>
</body>
</html>