想請教一下,是否有可能利用vb做一個對應下面的註冊碼做一個註冊機呢?
這是從網路上所找到的碼:
Dim temp
temp = 88888888
Dim MyUserName
MyUserName = GetSetting(appname:="MyApp", section:="Startup", Key:="User")
RegValue = GetSetting(appname:="MyApp", section:="Startup", Key:="Reg")
Dim Reg, Serial1, Serial2 As Long
v = GetHardDiskInfo(hdPrimaryMaster, 3)
For i = 1 To Len(v)
yzc = yzc + Asc(Mid(v, i, 1)) * 10
Next
Serial1 = yzc
Dim serial
serial = Serial1
Dim Head, RegCode As String
Dim head1, head2
head1 = Chr(Left(serial, 1) + 65 + (serial Mod 2))
head2 = Chr(Right(serial, 1) + 74)
Head = head1 & head2
Reg = Round(Abs(serial + temp) / 3, 0) + serial
If RegValue = serial + temp Then
MsgBox "本檔案已由" & MyUserName & "註冊成功!請放心使用! ", vbInformation, "註冊資訊"
Exit Sub
End If作者: ianlcc 時間: 2023-4-12 08:42