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

📄 wind.frm

📁 中国石化IC开发程序
💻 FRM
字号:
VERSION 5.00
Object = "{10336011-AB2C-11D4-8E1C-00002100DD42}#4.0#0"; "MWAX.ocx"
Begin VB.Form wind 
   Caption         =   "wind"
   ClientHeight    =   5565
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7530
   LinkTopic       =   "Form1"
   ScaleHeight     =   5565
   ScaleWidth      =   7530
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command6 
      Caption         =   "找出DF名称,选中DF,读出ASN"
      Height          =   495
      Left            =   3720
      TabIndex        =   5
      Top             =   1680
      Width           =   3135
   End
   Begin VB.CommandButton Command5 
      Caption         =   "校验PIN"
      Height          =   495
      Left            =   5040
      TabIndex        =   4
      Top             =   2400
      Width           =   1815
   End
   Begin VB.CommandButton Command4 
      Caption         =   "圈存"
      Height          =   495
      Left            =   5040
      TabIndex        =   3
      Top             =   4560
      Width           =   1815
   End
   Begin VB.CommandButton Command3 
      Caption         =   "校验MAC1,产生MAC2."
      Height          =   495
      Left            =   5040
      TabIndex        =   2
      Top             =   3840
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "产生测试用户卡"
      Height          =   495
      Left            =   1680
      TabIndex        =   1
      Top             =   3240
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "圈存初始化"
      Height          =   495
      Left            =   5040
      TabIndex        =   0
      Top             =   3120
      Width           =   1815
   End
   Begin MWAX.MWactiveX MW 
      Left            =   0
      Top             =   0
      _ExtentX        =   2990
      _ExtentY        =   1508
   End
End
Attribute VB_Name = "wind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
'上卡座
mbRet = MW.Reset
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Delete
If Not mbRet Then MsgBox MW.Errshow
'建MF
mbRet = MW.Create_File(geU_CreateMF, "FFFFFFFFFFFFFFFF0f01315041592e5359532e4444463031")
If Not mbRet Then MsgBox MW.Errshow
'建KEY
mbRet = MW.Create_File(geU_CreateEF, "0005050f000619")
If Not mbRet Then MsgBox MW.Errshow
'ATR
mbRet = MW.Create_File(geU_CreateEF, "0004040f0f000A")
If Not mbRet Then MsgBox MW.Errshow
'0001
mbRet = MW.Create_File(geU_CreateEF, "0001020f0f0060")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File(geU_SelectEF, "0001")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Append_Record("00", 9, "61074f051234567890")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Update_Record(1, "0C", 9, "61074f051234567890")
If Not mbRet Then MsgBox MW.Errshow
'ADF
mbRet = MW.Create_File(geU_CreateDF, "2F010f001234567890")
If Not mbRet Then MsgBox MW.Errshow
'建KEY
mbRet = MW.Create_File(geU_CreateEF, "0005050f000619")
If Not mbRet Then MsgBox MW.Errshow

mbRet = MW.Write_Key(geU_WordInstall, "", "", "010100010fff0fff12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key(geU_WordInstall, "", "", "010100020fff0fff12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key(geU_WordInstall, "", "", "010100000fff0fff12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key(geU_WordInstall, "", "", "010100030fff0fff12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key(geU_WordInstall, "", "", "010100040fff0fff12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key(geU_WordInstall, "", "", "0101000b0f000fff1234")
If Not mbRet Then MsgBox MW.Errshow

'建0015
mbRet = MW.Create_File(geU_CreateEF, "0015000f0f0030")
If Not mbRet Then MsgBox MW.Errshow
Dim pbIn(50) As Byte
Dim piI As Integer
For piI = 0 To 49
    pbIn(piI) = piI
Next piI

'**********************************
mbRet = MW.Update_Binary(geU_Data, "95", 0, 20, pbIn())
If Not mbRet Then MsgBox MW.Errshow
'**********************************

'建0016
mbRet = MW.Create_File(geU_CreateEF, "0016000f0f0039")
If Not mbRet Then MsgBox MW.Errshow

mbRet = MW.Create_File(geU_CreateEF, "0018030f0f0a17")
If Not mbRet Then MsgBox MW.Errshow

mbRet = MW.Create_File(geU_CreateEF, "000207ffffffff")
If Not mbRet Then MsgBox MW.Errshow

'建EF(定长记录文件)
mbRet = MW.Create_File(geU_CreateEF, "0003000f0f0020")
If Not mbRet Then MsgBox MW.Errshow
'建结束MF
mbRet = MW.Create_File(geU_CreateEndMF, "3F00")
If Not mbRet Then MsgBox MW.Errshow
End Sub

Private Sub Command5_Click()
mbRet = MW.Verify("1234")
If Not mbRet Then MsgBox MW.Errshow
End Sub

Private Sub Command6_Click()
mbRet = MW.Reset
If Not mbRet Then MsgBox MW.Errshow
'**********************************
Dim psRec As String * 30
'<1>读ADF名称
mbRet = MW.Read_Record(1, "0c", 15, psRec)
If Not mbRet Then MsgBox MW.Errshow
'**********************************
Dim psDFname As String
psDFname = Mid(psRec, 9, Val(Mid(psRec, 7, 2)) * 2)
'<2>.按目录名称选中ADF目录.此处为了快速完成例子,按标识符选择DF
mbRet = MW.Select_File(geU_SelectDF, "2f01")
If Not mbRet Then MsgBox MW.Errshow
'<3>读ASN取右8个字节.
'**********************************
Dim pbOut(20) As Byte
mbRet = MW.Read_Binary("95", 0, 20, pbOut())
If Not mbRet Then MsgBox MW.Errshow
'**********************************
Dim psASNTemp  As String * 40
mbRet = MW.Hex_To_Asc(pbOut(0), psASNTemp, 20)
Dim psASN As String
psASN = Right(psASNTemp, 32)
End Sub

Private Sub Form_Load()
Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
mbRet = MW.Com_Open(geU_Com1, geU_Baud9600)
If Not mbRet Then MsgBox MW.Errshow
End Sub

Private Sub Form_Unload(Cancel As Integer)
mbRet = MW.Com_Close
If Not mbRet Then MsgBox MW.Errshow
End Sub

⌨️ 快捷键说明

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