|
楼主 |
发表于 2006-1-8 19:32
|
显示全部楼层
re:有没有C++高手,帮忙搞下注册机,不胜感...
有没有C++高手,帮忙搞下注册机,不胜感激!<br>
以下是hahan提供的EASE4.1注册机的核心代码,在C++里面,适当添加辅助代码便能够使用了:<br>
----------------------<br>
说明:<br>里面的头文件和声明可以到 <a target=_blank href="http://www.sheriff-software.com/">http://www.sheriff-software.com/</a> 下载。<br>
<br>
char WinDir[MAX_PATH];<br>::GetWindowsDirectory(WinDir, sizeof(WinDir)); //得到windows目录<br>
<br>const static char *ProductID = "5357-8611-2529-7641-5708";<br>r = SLS_Register(ProductID, "EASE 4.0", WinDir);<br>r = SLS_GetReference(ProductID, ReferenceCode);<br>
<br>struct _SLS_LICENCE lic;<br>ZeroMemory(&lic, sizeof(lic)); <br>lic.AccessKey = 5; //Full without AURA<br>::CreateLicence(ReferenceCode, lic, s, 0, 0);<br>char Key[128];<br>::AddDashToText(s, Key, 4);<br>
<br>r = SLS_SetLicence(ProductID, ReferenceCode, Key);<br>
<br>SLS_SetPublisherData(ProductID, "xxxx"); //不同版本,此内容不同 |
|