有任何疑问,请联系我们:china@enigmaprotector.com

帮助

使用手册
附加信息
使用手册

插件

Splash

Enigma Protector 提供对插件的支持,插件被嵌入到保护后的文件中,随被保护的文件一起运行。Enigma Protector 的插件存放在安装目录下的 Plugin 子目录。如果您想要添加自己的插件,将它复制到(例如)Enigma Protector\Plugins\ 目录,打开(重新打开)Enigma Protector 就可以看到了。使用插件可以扩展功能,加强保护,创建自己的保护系统,完全控制要保护的文件!您可以通过列表选择要嵌入保护的插件,双击来查看插件描述。

插件开发包 SDK

插件就是一个可以导出函数的 DLL 文件,可以使用任何编译器编译(MS C++, Borland C++, MASM, Delphi 等),只要它支持非托管代码(也就是不支持使用 .NET 技术编译的 DLL 文件)。

插件 DLL 可以导出的函数:

Enigma_Plugin_About - 返回 wide char (UNICODE) 字符串, 定义了插件名称和作者(信息显示在插件列表的“关于”一列);

Enigma_Plugin_Description - 返回 wide char (UNICODE) 字符串,定义了插件描述和功能(双击列表中的插件时可以看到);

Enigma_Plugin_OnInit - 保护后的文件启动时会调用这个子程序。注意,这个子程序会在被保护文件在内存中运行之前调用。例如,这里可以放置自己的调试器检测。

Enigma_Plugin_OnFinal - 保护后的文件运行后将会在内存调用这个子程序。

Enigma_Plugin_OnSaveKey - function is calling when protected file is trying to save registration information. It can be used to skip standard saving routine to allow more flexibility to save registration information. Function has 4 parameters, ARegName and ARegKey contain pointers to registration name and key buffers and ARegNameLen and ARegKeyLen contain number of bytes of name and key buffers. Note, for handling of Wide Strings and UNICODE registrtation scheme you should divide ARegNameLen and ARegKeyLen values on 2 to get actual length of the string. This function should return FALSE if it is not saved registration information (or it is not needed to save it) and TRUE if function succeeded. Note, standard saving routine will not be called if this function returned TRUE.

Enigma_Plugin_OnLoadKey - function is calling when protected file is trying to load registration information. It can be used to skip standard loading routine to allow more flexibility to load registration information. Function has 4 output parameters. ARegName and ARegKey after successful loading should contain pointers to the buffers of registration name and key and ARegNameLen and ARegKeyLen should contain number of bytes of name and key buffers. Note, you have to allocate buffers for ARegName and ARegKey manually (somewhere in global space). For handling of Wide Strings and UNICODE registrtation scheme you should multiply lengths of the strings on 2. This function should return FALSE if it is not loaded registration information (or it is not needed to load it) and TRUE if function succeeded. Note, standard loading routine will not be called if this function returned TRUE.