Files
vmprotect/help/en/sdk_functions.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

162 lines
8.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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>SDK functions</title>
</head>
<body>
<h1>SDK functions</h1>
<p>SDK functions can be integrated to the source code of the protected application to set boundaries of the protected areas, to detect debuggers or virtualization tools.</p>
<p><strong>Code markers</strong></p>
<ul>
<li><a href="#DogProtectBegin">DogProtectBegin</a></li>
<li><a href="#DogProtectBeginVirtualization">DogProtectBeginVirtualization</a></li>
<li><a href="#DogProtectBeginMutation">DogProtectBeginMutation</a></li>
<li><a href="#DogProtectBeginUltra">DogProtectBeginUltra</a></li>
<li><a href="#DogProtectBeginVirtualizationLockByKey">DogProtectBeginVirtualizationLockByKey</a></li>
<li><a href="#DogProtectBeginUltraLockByKey">DogProtectBeginUltraLockByKey</a></li>
<li><a href="#DogProtectEnd">DogProtectEnd</a></li>
</ul>
<p><strong>Service functions</strong></p>
<ul>
<li><a href="#DogProtectIsProtected">DogProtectIsProtected</a></li>
<li><a href="#DogProtectIsDebuggerPresent">DogProtectIsDebuggerPresent</a></li>
<li><a href="#DogProtectIsVirtualMachinePresent">DogProtectIsVirtualMachinePresent</a></li>
<li><a href="#DogProtectIsValidImageCRC">DogProtectIsValidImageCRC</a></li>
<li><a href="#DogProtectDecryptStringA">DogProtectDecryptStringA</a></li>
<li><a href="#DogProtectDecryptStringW">DogProtectDecryptStringW</a></li>
<li><a href="#DogProtectFreeString">DogProtectFreeString</a></li>
</ul>
<p><strong>Licensing functions</strong></p>
<ul>
<li><a href="manager/usage/api.htm">DogProtectSetSerialNumber</a></li>
<li><a href="manager/usage/api.htm">DogProtectGetSerialNumberState</a></li>
<li><a href="manager/usage/api.htm">DogProtectGetSerialNumberData</a></li>
<li><a href= "manager/usage/api.htm">DogProtectGetCurrentHWID</a></li>
</ul>
<p id="DogProtectBegin"><strong>DogProtectBegin</strong></p>
<pre class="code">void DogProtectBegin(const char *MarkerName);
</pre>
<p>The <a href="use_markers.htm">marker</a> identifying the beginning of the protected area of the code. A call to DogProtectBegin must be placed before the first command (or procedure or function call) of the protected code block.
MarkerName defines the name of the marker that looks like "DogProtectMarker"+MarkerNamе in DogProtect. For example, a marker
DogProtectBegin('CheckRegistration') will look as
DogProtectMarker "CheckRegistration". If the name of the marker is not set, it is given a unique name in the form of "DogProtectMarker"+marker_serial_number. You can set the <a href=
"project_functions.htm#CompilationTypes">compilation type</a> of the given protected block in DogProtect.</p>
<p id="DogProtectBeginVirtualization"><strong>DogProtectBeginVirtualization</strong></p>
<pre class="code">void DogProtectBeginVirtualization(const char *MarkerName);
</pre>
<p>The marker identifying the beginning of the protected area of the code with the predefined "virtualization" compilation type.
MarkerName defines the <a href="#DogProtectBegin">name of the marker</a>.
The compilation type of this marker cannot be changed during further work with DogProtect.</p>
<p id="DogProtectBeginMutation"><strong>DogProtectBeginMutation</strong></p>
<pre class="code">void DogProtectBeginMutation(const char *MarkerName);
</pre>
<p>The marker identifying the beginning of the protected area of the code with the predefined "mutation" compilation type. MarkerName defines the <a href="#DogProtectBegin">name of the marker</a>.
The compilation type of this marker cannot be changed during further work with DogProtect.</p>
<p id="DogProtectBeginUltra"><strong>DogProtectBeginUltra</strong></p>
<pre class="code">void DogProtectBeginUltra(const char *MarkerName);
</pre>
<p>The marker identifying the beginning of the protected area of the code with the predefined "ultra (virtualization+mutation)" compilation type. MarkerName defines the <a href="#DogProtectBegin">name of the marker</a>. The compilation type of this marker cannot be changed during further work with DogProtect.</p>
<p id="DogProtectBeginVirtualizationLockByKey"><strong>DogProtectBeginVirtualizationByKey</strong></p>
<pre class="code">void DogProtectBeginVirtualizationLockByKey(const char *MarkerName);
</pre>
<p>The marker identifying the beginning of the protected area of the code with the predefined "virtualization" compilation type and the enabled <a href=
"project_functions.htm#LockToKey">"Lock to key"</a> option.
MarkerName defines the <a href="#DogProtectBegin">name of the marker</a>. The compilation type of this marker cannot be changed during further work with DogProtect.</p>
<p id="DogProtectBeginUltraLockByKey"><strong>DogProtectBeginUltraLockByKey</strong></p>
<pre class="code">void DogProtectBeginUltraLockByKey(const char *MarkerName);
</pre>
<p>The marker identifying the beginning of the protected area of the code with the predefined "ultra (virtualization+mutation)" compilation type and the enabled <a href=
"project_functions.htm#LockToKey">"Lock to key"</a> option. MarkerName defines the <a href="#DogProtectBegin">name of the marker</a>. The compilation type of this marker cannot be changed during further work with DogProtect.</p>
<p id="DogProtectEnd"><strong>DogProtectEnd</strong></p>
<pre class="code">void DogProtectEnd(void);
</pre>
<p>The marker identifying the end of the protected area of the code. The call to DogProtectEnd must be placed after the last command (procedure or function call) of the protected code block.</p>
<p id="DogProtectIsProtected"><strong>DogProtectIsProtected</strong></p>
<pre class="code">bool DogProtectIsProtected(void);
</pre>
<p>The DogProtectIsProtected function returns True if the file is processed by DogProtect.</p>
<p id="DogProtectIsDebuggerPresent"><strong>DogProtectIsDebuggerPresent</strong></p>
<pre class="code">bool DogProtectIsDebuggerPresent(bool CheckKernelMode);
</pre>
<p>The DogProtectIsDebuggerPresent function allows to detect the launch of the application under a debugger. The result
(True/False) can be processed with in-app protection mechanisms. If CheckKernelMode=False the function checks for User-mode debuggers (OllyDBG, WinDBG etc.). If CheckKernelMode=True, both User-mode and Kernel-mode debuggers (SoftICE,
Syser etc.). When protecting drivers, the value of CheckKernelMode does not make sense, because drivers always work in the kernel mode, so presence of kernel-mode debugger is always checked.</p>
<p id="DogProtectIsVirtualMachinePresent"><strong>DogProtectIsVirtualMachinePresent</strong></p>
<pre class="code">bool DogProtectIsVirtualMachinePresent(void);
</pre>
<p>The DogProtectIsVirtualMachinePresent function allows to detect the launch of the application under a virtual machine tool: VMware, Virtual PC,
VirtualBox, Sandboxie. The result
(True/False) can be processed with in-app protection mechanisms.</p>
<p id="DogProtectIsValidImageCRC"><strong>DogProtectIsValidImageCRC</strong></p>
<pre class="code">bool DogProtectIsValidImageCRC(void);
</pre>
<p>The DogProtectIsValidImageCRC function detects the fact that the executable module has been changed in the memory of the process (only unchangeable segments of code and data are checked). The result
(True/False) can be processed with in-app protection mechanisms.</p>
<p id="DogProtectDecryptStringA"><strong>DogProtectDecryptStringA</strong></p>
<pre class="code">const char * DogProtectDecryptStringA(const char *Value);
</pre>
<p>The DogProtectDecryptStringA function decrypts the ANSI string constant - Value. To decrypt the constant, you must <a href="project_functions.htm#AddFunction">include it to the list of protected objects
</a>.</p>
<p id="DogProtectDecryptStringW"><strong>DogProtectDecryptStringW</strong></p>
<pre class="code">const wchar_t * DogProtectDecryptStringW(const wchar_t *Value);
</pre>
<p>The DogProtectDecryptStringW function decrypts the Unicode string constant - Value. To decrypt the constant, you must <a href="project_functions.htm#AddFunction">include it to the list of protected objects</a>.</p>
<p id="DogProtectFreeString"><strong>DogProtectFreeString</strong></p>
<pre class="code">bool DogProtectFreeString(const void *Value);
</pre>
<p>The DogProtectFreeString function frees dynamic memory allocated for the decrypted string. It is not necessary to free up memory, but if you do this - you must use this function.
If DogProtectDecryptStringA/DogProtectDecryptStringW are used with the same parameters for the second time without destroying previously decrypted string, additional memory is not allocated.</p><br />
<br />
<br />
<br />
<br />
<hr noshade="noshade" size="1" />
<div align="center">
</div>
</body>
</html>