TTProtect-SDK is only available to Professional Edition and Enterprise Edition. We strongly recommend the use of this macro whenever possible, due to its flexibility and continuous improvement in the internal protection of these macros.
VM Macro
The VM_START and VM_END macros allow you to mark regions of code that will be executed inside the Virtual Machine. The Virtual machine can effectively protect a specific code, but executive slower.
C++ VM Macro Add:
VM_START
//code need
to be protected ;
VM_END
Delphi VM Macro Add:
{$I VM_START.inc}
//code need
to be protected;
{$I VM_END.inc}
1.To avoid a decrease in your program performance when protected the code inside the macro, you should avoid many iterations loops (FOR, WHILE, DO...) inside the VM macro.
2.Switch statements inside the macro might not work properly in some compiled applications.
3.Exception handling inside the macro will not work properly. You should avoid putting VM macros around try-except clauses.
4."return" inside the VM macro will not work properly.
For example:
VM_START
return 0;
VM_END May cause error!
Recommend the alternative codes:
int result = 0;
VM_START
result = 0;
VM_END
return result;
5.The jump from outside may cause error.
For example:
goto setj;
VM_START
i = 1;
setj:
j = 2;
VM_END May cause error!
Recommend the alternative codes:
VM_START
goto setj;
i = 1;
setj:
j = 2;
VM_END
Encode Macro
The ENCODE_START and ENCODE_END macros allow you to mark regions of code that will be executed inside the TTProtect.This will substantially increase the difficult to crack the application and execute faster than the virtual machine macro, but the strength of encryption lower than the virtual machine. Therefore, recommend the important code use VM Macro.
C++ Encode Macro Add:
ENCODE_START
//code need
to be protected;
ENCODE_END
Delphi Encode Macro Add:
{$I ENCODE_START.inc}
//code need
to be protected;
{$I ENCODE_END.inc}