以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  求助 另一种软件加密方式  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=157594)

--  作者:jackyfashion
--  发布时间:2020/10/21 22:46:00
--  求助 另一种软件加密方式
老师: 您好!
如果要注册表记录使用次数,要改那个代码?请老师指教!!!

Dim n As Integer = GetConfigValue("Count",1)
Dim
Code As String = GetConfigValue("Register" & ComputerId,"")
Dim
Ok As Boolean
If
Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then \'如果注册码正确
    OK =
True
Else
    If
n > 30 Then
        Forms(
"注册").Open()
        Code = GetConfigValue(
"Register" & ComputerId,"")
        If
Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then \'如果注册码正确
            OK =
True
        End
If
    End
If
    If
n > 60 AndAlso Ok = False Then
        Messagebox.Show(
"您正在使用的产品已经超出试用次数!")
        Syscmd.Project.
Exit()
    End
If
End
If
n = n +
1

SaveConfigValue("Count",n)!
谢谢!!!

--  作者:有点蓝
--  发布时间:2020/10/22 8:52:00
--  
GetConfigValue改为Registry.GetValue
SaveConfigValue改为Registry.SetValue


--  作者:jackyfashion
--  发布时间:2020/10/25 12:02:00
--  
谢谢老师!!!