Module1.bas
3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Attribute VB_Name = "Module1"
Option Explicit
Global icdev As Long
Global st As Integer
'comm function
Declare Function dc_init Lib "dcrf32.dll" (ByVal port%, ByVal baud&) As Long
Declare Function dc_exit Lib "dcrf32.dll" (ByVal icdev&) As Integer
Declare Function dc_card Lib "dcrf32.dll" (ByVal icdev&, ByVal mode%, snr&) As Integer
Declare Function dc_beep Lib "dcrf32.dll" (ByVal icdev&, ByVal mtime%) As Integer
Declare Function dc_reset Lib "dcrf32.dll" (ByVal icdev&, ByVal mtime%) As Integer
Declare Function dc_config_card Lib "dcrf32.dll" (ByVal icdev&, ByVal cardtype%) As Integer
Declare Function dc_load_key_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal mode%, ByVal secnr%, ByVal nkey$) As Integer
Declare Function dc_authentication Lib "crf32.dll" (ByVal icdev&, ByVal mode%, ByVal scenr%) As Integer
Declare Function dc_read_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal adr%, ByVal sdata$) As Integer
Declare Function dc_write_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal adr%, ByVal sdata$) As Integer
Declare Function dc_pro_reset_hex Lib "dcrf32.dll" (ByVal icdev&, rlen%, ByVal sdata$) As Integer
Declare Function dc_pro_commandhex Lib "dcrf32.dll" (ByVal icdev&, ByVal slen%, ByVal sendbuffer$, rlen%, _
ByVal databuffer$, ByVal timeout%) As Integer
Declare Function dc_card_b_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal snr$) As Integer
Declare Function dc_setcpu Lib "dcrf32.dll" (ByVal icdev&, ByVal position%) As Integer
Declare Function dc_cpureset_hex Lib "dcrf32.dll" (ByVal icdev&, rlen%, ByVal databuffer$) As Integer
Declare Function dc_cpuapdu_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal slen%, ByVal sendbuffer$, _
rlen%, ByVal databuffer$) As Integer
Declare Function dc_read_4442_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_write_4442_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_verifypin_4442_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal passwd$) As Integer
Declare Function dc_readpin_4442_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal passwd$) As Integer
Declare Function dc_readpincount_4442 Lib "dcrf32.dll" (ByVal icdev&) As Integer
Declare Function dc_changepin_4442_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal passwd$) As Integer
Declare Function dc_read_4428_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_write_4428_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_verifypin_4428_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal passwd$) As Integer
Declare Function dc_readpin_4428_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal passwd$) As Integer
Declare Function dc_readpincount_4428 Lib "dcrf32.dll" (ByVal icdev&) As Integer
Declare Function dc_changepin_4428_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal passwd$) As Integer
Declare Function dc_read_24c_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_write_24c_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_read_24c64_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Declare Function dc_write_24c64_hex Lib "dcrf32.dll" (ByVal icdev&, ByVal offset%, ByVal lenth%, ByVal buffer$) As Integer
Sub quit()
If icdev > 0 Then
st = dc_exit(icdev)
icdev = -1
End If
End Sub