DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: luismasgoret
今日帖子: 40
在线用户: 12
导航: 论坛 -> 发布控件 斑竹:liumazi,ruralboy  
作者:
男 firerose (华鸿世纪-火玫瑰) ★☆☆☆☆ -
盒子活跃会员
2004/5/3 14:21:11
标题:
HHSoftReg.dll 华鸿世纪注册组件(制作软件注册功能) 浏览:3050
加入我的收藏
楼主: HHSoftReg.dll 华鸿世纪注册组件
程序设计:华鸿世纪科技产品研发中心
网址:http://www.21cit.net

在使用时建议将 HHSoftReg.dll 文件换名并安装到系统文件夹中。

演示程序是 For Delphi7 的版本。

函数声明方法 
在 {$R *.dfm} 后输入下面的函数及软件 ID

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//例子                                                                                                            //
//Const                                //      
//  SoftID: array [0..15] of Byte =($10,$F4,$8F,$36,$73,$86,$F3,$6B,$53,$16,$7C,$CD,$49,$8C,$18,$CF); //设置软件ID//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Const
  SoftID: array [0..15] of Byte =({软件ID 用注册码生成器生成}); //软件识别码


//参数 softid 为软件 ID

//记录运行时间及次数
procedure NoteRunDate(softid:array of Byte);stdcall;external 'HHSoftReg.dll';

//获取首次运行时间
function GetFirstRunDate(softid:array of Byte):TDateTime;stdcall;external 'HHSoftReg.dll';

//获取最后一次运行时间
function GetLastRunDate(softid:array of Byte):TDateTime;stdcall;external 'HHSoftReg.dll';

//获取运行天数
function GetRunDays(softid:array of Byte):Integer;stdcall;external 'HHSoftReg.dll';

//获取硬盘序列号
function GetIdeSerialNumber : WideString;stdcall;external 'HHSoftReg.dll';

//验证是否注册 idesn 硬盘序列号
function IsReg(idesn:String;softid:array of Byte): Boolean;stdcall;external 'HHSoftReg.dll';

//注册 reguser 注册用户名  regkey 注册码  idesn 硬盘序列号
function FunReg(reguser,regkey,idesn: String; softid: array of Byte):Boolean;stdcall;external 'HHSoftReg.dll';

//获取运行次数
function GetRunTimes(softid:array of Byte):Integer;stdcall;external 'HHSoftReg.dll';

//获取注册用户名称
function GetRegUser(softid:array of Byte): WideString;stdcall;external 'HHSoftReg.dll';

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////


使用技巧:

[SoftID变量定义及附值]

Const
  SoftID: array [0..15] of Byte =(软件识别码 用注册码生成器生成); //设置软件识别码  

定义硬盘序列号变量
var 
  idesn: String;

procedure TForm1.FormCreate(Sender: TObject);
begin
  //下面两个语句任迁一句
  idesn:=GetIdeSerialNumber;//注册时要硬盘序列号
  idesn:=''; //注册时不要硬盘序列号 
end;


1、如果不想让用户更改时间,可以加入这样的判断

  if GetLastRunDate(SoftID) > now then
  begin
    Application.MessageBox('请不要更改系统时间,否则程序将不能正常运行!', '提示', 
      MB_OK + MB_ICONSTOP);  
    Application.Terminate;
  end;

2、试用期判断,例如30天

  if GetRunDays(SoftID)>30 then
  begin
    Application.MessageBox('30天试用期已到,请及时注册!', '提示', 
      MB_OK + MB_ICONSTOP);  
    Application.Terminate;
  end;
  
3、试用次数判断,例如15次

  if GetRunTimes(SoftID)>15 then
  begin
    Application.MessageBox('15次试用已到,请及时注册!', '提示', 
      MB_OK + MB_ICONSTOP);  
    Application.Terminate;
  end;

4、判断是否注册

  case IsReg(SoftID) of
    True:
      begin
        Application.MessageBox('已经注册!', '提示', 
      MB_OK + MB_ICONSTOP);
      end;
    False:
      begin
        Application.MessageBox('未注册!', '提示', 
      MB_OK + MB_ICONSTOP);
      end;
  end;

5、注册软件

    if FunReg('用户名','注册码',softid) then
  begin
    Application.MessageBox('软件注册成功,恭喜您成为本软件的正版用户!',
      '提示', MB_OK + MB_ICONINFORMATION);
  end else
  begin
    Application.MessageBox('您输入的注册用户名或软件授权码有误,请重新输入!', 
      '提示', MB_OK + MB_ICONSTOP);   
  end;  



需要注册码的请来信:FireRoseSoft@Msn.com,请附上注册用户名及硬件号。
为了保证这种组件的安全性,组件绝不公开源代码,请谅解!
此帖子包含附件:firerose_200453142038.rar 大小:901.4K
----------------------------------------------
Delphi 免费组件提供 http://www.delphi-free.com
作者:
男 firerose (华鸿世纪-火玫瑰) ★☆☆☆☆ -
盒子活跃会员
2004/5/3 14:24:38
1楼: 注册码生成器截图:
此帖子包含附件:
JPEG 图像
大小:44.5K
----------------------------------------------
Delphi 免费组件提供 http://www.delphi-free.com
作者:
男 firerose (华鸿世纪-火玫瑰) ★☆☆☆☆ -
盒子活跃会员
2004/5/8 10:28:42
2楼: 最新版本: http://www.21cit.net/hhsoftreg.asp
在2004年5月份可以免费注册,要注册的请快行动。
----------------------------------------------
Delphi 免费组件提供 http://www.delphi-free.com
作者:
男 kuangdaoisme (狂刀人) ★☆☆☆☆ -
盒子活跃会员
2004/5/9 11:24:17
3楼: 老大,你在哪儿记录运行次数的啊?
----------------------------------------------
我的邮箱

学习中进步!
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行93.75毫秒 RSS