⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mc32_10.frm

📁 IC卡分为两种 一种是接触式的 还一种是非接触式的 此文件二种程序都有 希望能帮到会员们
💻 FRM
字号:
VERSION 5.00
Begin VB.Form MC32_10 
   Caption         =   "MC32_10"
   ClientHeight    =   3825
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   ScaleHeight     =   3825
   ScaleWidth      =   5775
   StartUpPosition =   3  'Windows Default
   Begin VB.ListBox List1 
      Height          =   2400
      ItemData        =   "MC32_10.frx":0000
      Left            =   360
      List            =   "MC32_10.frx":0002
      TabIndex        =   1
      Top             =   1080
      Width           =   2655
   End
   Begin VB.CommandButton Command6 
      Caption         =   "102"
      Height          =   375
      Left            =   3840
      TabIndex        =   0
      Top             =   1920
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      Height          =   2895
      Left            =   120
      ScaleHeight     =   2835
      ScaleWidth      =   5475
      TabIndex        =   2
      Top             =   840
      Width           =   5535
   End
   Begin VB.Label Label1 
      Caption         =   "10系列函数调用例程"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   1560
      TabIndex        =   3
      Top             =   120
      Width           =   3495
   End
End
Attribute VB_Name = "MC32_10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Data1 As String * 10
Dim Data2 As String * 10
Dim Offset As Integer
Dim length As Integer
Dim status As Integer
Dim password(2) As Byte
Dim pass(6) As Byte
Dim proval As String * 8
Dim counter As Integer

Private Sub Command6_Click()
st = chk_102(icdev)
If st = 0 Then
    List1.AddItem ("chk Ok")
Else
    List1.AddItem ("chk card error")
    Exit Sub
End If

password(0) = &HF0
password(1) = &HF0
st = csc_102(icdev, 2, password(0))
If st = 0 Then
    List1.AddItem ("csc Ok")
Else
    List1.AddItem ("csc  error")
End If



st = rsc_102(icdev, 2, password(0))
 
If st = 0 Then
    List1.AddItem ("rsc Ok")
Else
    List1.AddItem ("rsc  error")
End If


password(0) = &HF0
password(1) = &HF0
st = wsc_102(icdev, 2, password(0))
If st = 0 Then
    List1.AddItem ("wsc Ok")
Else
    List1.AddItem ("wsc  error")
End If

st = rsct_102(icdev, counter)
If st = 0 Then
    List1.AddItem ("rsct Ok")
    List1.AddItem (Str(counter))
Else
    List1.AddItem ("rsct  error")
End If

pass(0) = &HFF
pass(1) = &HFF
pass(2) = &HFF
pass(3) = &HFF
pass(4) = &HFF
pass(5) = &HFF
st = cesc_102(icdev, 1, 6, pass(0))
If st = 0 Then
    List1.AddItem ("cesc Ok")
Else
    List1.AddItem ("cesc  error")
End If

st = resc_102(icdev, 1, 6, pass(0))
If st = 0 Then
    List1.AddItem ("resc Ok")
Else
    List1.AddItem ("resc  error")
End If

st = resct_102(icdev, 2, counter)
If st = 0 Then
    List1.AddItem ("resct Ok")
Else
    List1.AddItem ("resct  error")
End If

st = ser_102(icdev, 1, 30, 10)
If st = 0 Then
    List1.AddItem ("ser Ok")
Else
    List1.AddItem ("ser  error")
End If

Offset = 30
length = 10
Data1 = "1234567890"
st = swr_102(icdev, 1, Offset, length, Data1)
If st = 0 Then
  List1.AddItem ("write OK")
Else
  List1.AddItem ("write error")
 
End If

st = srd_102(icdev, 1, Offset, length, Data2)
If st = 0 Then
  List1.AddItem ("read OK")
  List1.AddItem (Data2)
Else
  List1.AddItem ("read error")
  Exit Sub
End If

st = clrpr_102(icdev, 1)
If st = 0 Then
  List1.AddItem ("clrpr OK")
Else
  List1.AddItem ("clrpr error")
  Exit Sub
End If

st = clrrd_102(icdev, 1)
If st = 0 Then
  List1.AddItem ("clrrd OK")
Else
  List1.AddItem ("clrrd error")
  Exit Sub
End If

End Sub
 
Private Sub Form_Load()
icdev& = ic_init(1, 9600)
If icdev& <= 0 Then
    List1.AddItem ("Init error!")
    Exit Sub
  Else
    List1.AddItem ("Init OK")
  End If
  
st = get_status(icdev, status)
If st = 0 Then
  List1.AddItem ("Status OK")
Else
  List1.AddItem ("Status Error")
  Exit Sub
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
st = ic_exit(icdev)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -