📄 ecode_this.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "Ecode_this"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'这个是严正是否是正版的
Public Function checkCode(ByVal conStr As String, ByVal comName As String) As Boolean
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.Open conStr
checkCode = False
rs.Open "select code from sys where id=1000", conn, adOpenDynamic, adLockOptimistic
If MD5(comName) = rs.Fields("code").Value Then
checkCode = True
End If
rs.Close
conn.Close
End Function
'这个是验证注册的
Public Function check(ByVal conStr As String, ByVal comName As String, ByVal ecode As String) As Boolean
Dim conn As New ADODB.Connection
conn.Open conStr
check = False
If ecode = MD5(comName) Then
conn.Execute "update sys set code='" & ecode & "' where ID=1000"
check = True
End If
conn.Close
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -