|
| » 首页 » 电脑_数码 » 编程 » 请问下VB中怎么使用加密狗的。。要程序。具体的代码!!... |
请问下VB中怎么使用加密狗的。。要程序。具体的代码!!... |
|
|
![]() |
|
|
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 一三七六九四六七二 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中怎么使用加密狗的。。要程序。具体的代码!!...》答案收集时间:2008-06-14 14:33:39 |