请问这段是对C盘序列号如何运算
小弟才刚开始接触VB,有多地方不懂!恳请指导一下有这以下这段,只知道是读C盘序列号,然后运算,有大家指点下是如何运算,谢谢!Private Sub Form_Initialize()
Dim l As Integer, i As Integer, HddIDMid() As String, HddID As String
HddID = GetSerialNumber("C:\")
'Debug.Print HddID
'Debug.Print Val(Mid(HddID, 1, 1))
0 l = Len(Trim(HddID))
ReDim HddIDMid(l)
For i = 1 To l Step 1
HddIDMid(i) = ChrW(Val(Mid(HddID, i, 1)) + 97) '单字符解密
' Debug.Print HddIDMid(i)
Next
HddID = ""
For i = l To 1 Step -1
HddID = Trim(HddIDMid(i)) + Trim(HddID) '组合后得到密码
Next
'Debug.Print HddID
'Debug.Print IWSH.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\001")
If HddID <> IWSH.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\001") Then ' 只能读ASCII字符,而GetSeting函数可以读非ASCII字符(ASCII码超出255)
MsgBox "1、此处省略。" & Chr(13) & _
"2、此处省略。" & Chr(13) & _
"3、此处省略。" & Chr(13) & Chr(13) & _