| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1267 人关注过本帖
标题:谁帮我用VB写个注册程序?
只看楼主 加入收藏
QQ1778687
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2008-2-21
结帖率:100%
收藏
 问题点数:0 回复次数:2 
谁帮我用VB写个注册程序?
自己写了一个脚本,想做个注册的软件,我想利用读取硬盘ID,然后通过算发算出注册码,谁能帮忙写个这样的注册程序?
搜索更多相关主题的帖子: 注册 
2008-09-15 18:35
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
程序代码:
Option Explicit

Private Declare Function GetVolumeInformation Lib _

 "kernel32.dll" Alias "GetVolumeInformationA" (ByVal _

 lpRootPathName As String, ByVal lpVolumeNameBuffer As _

 String, ByVal nVolumeNameSize As Integer, _

 lpVolumeSerialNumber As Long, lpMaximumComponentLength _

 As Long, lpFileSystemFlags As Long, ByVal _

 lpFileSystemNameBuffer As String, ByVal _

 nFileSystemNameSize As Long) As Long

Public Function GetSerialNumber(strDrive As String) As Long
Dim SerialNum As Long, Res As Long, temp1 As String, temp2 As String
temp1 = String$(255, Chr$(0))
temp2 = String$(255, Chr$(0))
Res = GetVolumeInformation(strDrive & ":/", temp1, _
Len(temp1), SerialNum, 0, 0, temp2, Len(temp2))
GetSerialNumber = SerialNum
End Function

Public Function CheckSerial(Hash) As Boolean

 CheckSerial = (GetSerial = Hash)
End Function

Public Function GetSerial(Optional DriveNumber As Long) As String

 If IsMissing(DriveNumber) Then DriveNumber = GetSerialNumber(Left(App.Path, 1))

 GetSerial = UCase(Left(Right(MD5(GetID & PrivateKey, 32), 18), 8))
End Function

Public Function GetID() As String

 GetID = UCase(Left(Right(MD5(GetSerialNumber(Left(App.Path, 1)) & PrivateKey, 32), 18), 8))
End Function
2008-09-15 19:33
快速回复:谁帮我用VB写个注册程序?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016156 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved