» 首页 » 电脑_数码 » 编程 » 请问下VB中怎么使用加密狗的。。要程序。具体的代码!!...

请问下VB中怎么使用加密狗的。。要程序。具体的代码!!...



以阿拉丁 hasp4 获取用户ID 为例,代码如下:
Private Sub btn_GetId_Click()
If Check_Hasp() = 0 Then
lbl_IDNum = ""
lbl_IDHex = ""
Exit Sub
End If
Service = TIMEHASP_GET_ID_NUM
p1& = 0
p2& = 0
Set_Args
Call hasp(Service, SeedCode, LptNum, Passw1, Passw2, p1&, p2&, p3&, p4&)
If p3& <> 0 Then
lbl_Retcode3.Caption = Str$(p3&)
lbl_IDNum = ""
lbl_IDHex = ""
If p3& = -29 Then
lbl_OutMsg.Caption = "Not a TimeHASP."
Else
lbl_OutMsg.Caption = "Get ID failed. Error code = " & Str$(p3&)
End If
Else
Rem
Rem The ID number is a 32 bit integer constructed
Rem from the following equation : p2*65536+p1
Rem
Rem The following computation converts the two 16 bit
Rem integers returned fron the hasp routine to a 32 bit
Rem integer.
Rem
If (p2& < 0) Then
ID& = (65536 + p2&)
ElseIf (p2& > 32767) Then
ID& = (p2 - 65536)
Else
ID& = p2&
End If

' shift left by 16 - done high word
ID& = ID& * 65536

' low word
If (p1& < 0) Then
ID& = ID& + 65536 + p1&
Else
ID& = ID& + p1&
End If

lbl_OutMsg.Caption = "Get ID OK."
lbl_IDNum = Str$(ID&)
lbl_IDHex = Hex(ID&)
End If
End Sub
我是专业破解加密狗的,有兴趣交流一下 QQ 一三七六九四六七二

以阿拉丁 hasp4 获取用户ID 为例,代码如下:
Private Sub btn_GetId_Click()
If Check_Hasp() = 0 Then
lbl_IDNum = ""
lbl_IDHex = ""
Exit Sub
End If
Service = TIMEHASP_GET_ID_NUM
p1& = 0
p2& = 0
Set_Args
Call hasp(Service, SeedCode, LptNum, Passw1, Passw2, p1&, p2&, p3&, p4&)
If p3& <> 0 Then
lbl_Retcode3.Caption = Str$(p3&)
lbl_IDNum = ""
lbl_IDHex = ""
If p3& = -29 Then
lbl_OutMsg.Caption = "Not a TimeHASP."
Else
lbl_OutMsg.Caption = "Get ID failed. Error code = " & Str$(p3&)
End If
Else
Rem
Rem The ID number is a 32 bit integer constructed
Rem from the following equation : p2*65536+p1
Rem
Rem The following computation converts the two 16 bit
Rem integers returned fron the hasp routine to a 32 bit
Rem integer.
Rem
If (p2& < 0) Then
ID& = (65536 + p2&)
ElseIf (p2& > 32767) Then
ID& = (p2 - 65536)
Else
ID& = p2&
End If

' shift left by 16 - done high word
ID& = ID& * 65536

' low word
If (p1& < 0) Then
ID& = ID& + 65536 + p1&
Else
ID& = ID& + p1&
End If

lbl_OutMsg.Caption = "Get ID OK."
lbl_IDNum = Str$(ID&)
lbl_IDHex = Hex(ID&)
End If
End Sub
我是专业破解加密狗的,有兴趣交流一下 QQ 一三七六九四六七二

加密狗里有许多API接口函数,你可以在你编写代码的时候调用里面的函数来实现加密,同时也可以使用加密狗的外壳工具来加密.exe和.dll文件

 相关问题
·请问下VB中怎么使用加密狗的。。要程序。具体的代码!!...
·网页时间代码
·Net Framework:v2.0装不上(急!!!!!!!!)
·怎样将字符串分割成单个的字符
·求助用dreamweaver制作留言本出问题了
·求助:MySql可视化管理工具
·15987开头的号码有多少?
·javascript高手帮忙下拉菜单改错
·鼠标滑过下拉菜单代码
·<!--#include file=\"../inc/Admin.asp\"-->中的权限问题
·挪威人口有什么问题?人口少会带来什么问题?有什么方法...
·MATLAB数学实验,急急急~~(回归问题)
·数控加工中心编程语言PowerMill好?还是Cimatron E好?
·请问谁有JBuilder开发工具中的JSP教学视频,最好包含sevl...
·使用JBuilder开发工具,现在想学JSP,请问哪位有从底层学...

 《请问下VB中怎么使用加密狗的。。要程序。具体的代码!!...》答案收集时间:2008-06-14 14:33:39



©2007 电脑技术问答录