打印本文 打印本文 关闭窗口 关闭窗口
小弟为共享软件作者制作的管理软件注册的动态链接库
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2686  更新时间:2009/4/23 18:58:51  文章录入:mintao  责任编辑:mintao
 RegestPassword = m_Password

End Property

 

Public Sub GetNamePassword()                       ''''获得用户名及密码的公用方法

                                                   ''''调用一次就会给用户名属性和密码属性赋一合法值

 Dim sTotal As String

 

 sTotal = CalculateNamePassword

 m_Name = Left(sTotal, 8)

 m_Password = Right(sTotal, 25)

 

End Sub

 

Public Sub Regest()                                ''''以合法用户名及密码注册软件的公有方法

 

 Dim sTotal As String

 Dim sSubName As String

 Dim sSubPassword As String

 Dim hEditKey As Long

 

 sTotal = CalculateNamePassword

 sSubName = Left(sTotal, 8)

 sSubPassword = Right(sTotal, 25)

 

 Dim lRegOpenError As Long

 

 lRegOpenError = RegOpenKeyEx(HKEY_LOCAL_MACHINE, m_RegestKey, 0, KEY_SET_VALUE, hEditKey)

 

 If lRegOpenError <> 0 Then

  MsgBox "Open Reg Error!Terminate!Please examine RegestKey."

  Exit Sub

 End If

 

 Dim lReturn As Long

 lReturn = RegSetValueEx(hEditKey, "Name", 0, REG_SZ, sSubName, 8)

 lReturn = RegSetValueEx(hEditKey, "Password", 0, REG_SZ, sSubPassword, 25)

 

End Sub

 

上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口