软件保护系统WinLicense独家保护技术SecureEngine使用指南(1)——在编程语言中使用宏

WinLicense使用SecureEngine?保护技术,该技术能够以最高优先级运行其代码,以实现前所未有的保护技术。SecureEngine?宏允许使用SecureEngine?与应用程序进行交互,从而使应用程序和SecureEngine?可以作为一个整体运行。

WinLicense是一个功能强大的保护系统,为希望保护其应用程序免受高级逆向工程和软件破解的软件开发人员设计。WinLicense使用SecureEngine护技术,该技术能够以最高优先级运行其代码,以实现前所未有的保护技术。

SecureEngine允许使用SecureEngine应用程序进行交互,从而使应用程序和SecureEngine以作为一个整体运行。要将SecureEngine包含到应用程序中,需要在应用程序源代码中指定这些宏。 当SecureEngine算保护应用程序时,它将在应用程序内找到这些宏并将所需的操作应用于每个特定的宏。

SecureEngine供给软件开发人员的不同宏如下:

  • Using macros in your programming language
  • VM macro
  • Mutate macro
  • StrEncrypt macro
  • Registered macro
  • Unregistered macro
  • Unprotected macro
  • CheckProtection macro
  • CheckCodeIntegrity macro
  • CheckRegistration macro
  • CheckVirtualPC macro

如果你还没有使用过WinLicense,可以点击此处下载最新版测试。


在编程语言中使用宏

当前版本的SecureEngine支持本机应用程序的宏(使用C / C ++,Delphi,Visual Basic等开发)。 请注意,这些宏不适用于.NET语言或以PCode模式编译的Visual Basic。

要将宏应用于特定的代码块,必须使用“ MacroName_START”标记标记该块的开头,并使用“ MacroName_END”标记标记该块的结尾。

限制条件

为了成功地将SecureEngine插入您的应用程序,需要满足一些条件。 如果不满足以下任何条件,则WinLicense在打开要保护的文件时将显示一条错误消息。 条件如下:

  • 宏不能嵌套,也就是说,宏不能插入另一个宏中。 以下是嵌套宏的示例:
    void MyFunction(void){  VM_START      // your code     VM_START     <--- nested!!! // your code VM_END // your code VM_END }
  • 每个宏都需要具有每个对应的“ MacroName_END”定界符。
  • 宏内的代码必须至少5个字节。

特定编程语言的用法

  • Delphi开发人员的特定信息。在下面的例子中,我们将展示如何在您的Delphi应用程序中使用SecureEngine的真实示例。
    function TfmMain.GetCRC32(FileName: string): string; begin  {$I VM_Start.inc}             // the following block of code is protected with an "VM" macro                                  BuildCRCTable;                   CRC := $FFFFFFFF;                                                AssignFile(F, FileName);         FileMode := 0;                   Reset(F);                       {$I VM_End.inc}               // end of "VM" macro  GetMem(Buffer, SizeOf(B)); {$I Registered_Start.inc}       // the following block of code is protected with a "Registered" macro  repeat   FillChar(b, SizeOf(b), 0);   BlockRead(F, b, SizeOf(b), e);   for i := 0 to (e-1) do    CRC := RecountCRC(b[i], CRC); until (e < 255) or (IOresult <> 0); {$I Registered_End.inc}         // end of "Registered" macro  {$I Mutate_Start.inc}             // the following block of code is protected with an "Mutate" macro  FreeMem(Buffer, SizeOf(B)); CloseFile(F); CRC := Not CRC; Result := '$' + HextL(CRC);  {$I Mutate_End.inc}               // end of "Mutate" macro end;
  • C/C++开发人员的特定信息。下面将演示如何在C / C ++应用程序中使用SecureEngine的真实示例。
    LRESULT CALLBACK MainHandler(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){   switch (message)   {   case WM_INITDIALOG:             VM_START                       // the following block of code is protected with a "CodeReplace" macro        if (WLRegGetStatus(NULL) == 1)       {           WLRegGetLicenseInfo(Name, Company, ExtraData);           SetDlgItemText(hDlg, IDC_NAMEEDIT, Name);           SetDlgItemText(hDlg, IDC_COMPANYNAME, Company);           SetDlgItemText(hDlg, IDC_EXTRAEDIT, ExtraData);       }       VM_END                         // end of "VM" macro              return TRUE;    case WM_COMMAND:        if (LOWORD(wParam) == IDCANCEL)       {          MUTATE_START                       // the following block of code is protected with an "Encode" macro                      EndDialog(hDlg, LOWORD(wParam));           MUTATE_END                         // end of "Mutate" macro            return TRUE;       }       break;   }   return FALSE;}
  • Visual Basic开发人员的特定信息。在下面的内容中,提供了一个有关如何在Visual Basic应用程序中使用SecureEngine的真实示例。
    Private Sub CheckStatusButton_Click()   If AppStatus <> 1 Then           Call VarPtr("VMStart")              TrialDaysLeftLabel.Caption = WLTrialDaysLeft       TrialExecLeftLabel.Caption = WLTrialExecutionsLeft       MinutesLabel.Caption = WLTrialGlobalTimeLeft       RuntimeLabel.Caption = WLTrialRuntimeLeft             Call VarPtr("VMEnd")                  End If   End Sub
  • 标签:

    声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

    上一篇 2020年1月4日
    下一篇 2020年1月4日

    相关推荐

    发表回复

    登录后才能评论