?? exampsam.frm
字號:
VERSION 5.00
Object = "{10336011-AB2C-11D4-8E1C-00002100DD42}#4.0#0"; "MWAX.ocx"
Begin VB.Form exampsam
Caption = "examples SmartCOS-PSAM"
ClientHeight = 6375
ClientLeft = 60
ClientTop = 345
ClientWidth = 7665
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 6375
ScaleWidth = 7665
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton DES_CRYPT
Caption = "DES_CRYPT"
Height = 495
Left = 5160
TabIndex = 24
Top = 5160
Width = 2415
End
Begin VB.CommandButton INIT_FOR_DESCRYPT
Caption = "INIT_FOR_DESCRYPT"
Height = 495
Left = 2640
TabIndex = 23
Top = 5160
Width = 2415
End
Begin VB.CommandButton OUT_KEY2
Caption = "OUT_KEY(""61"")"
Height = 495
Left = 2640
TabIndex = 22
Top = 4560
Width = 2415
End
Begin VB.CommandButton OUT_KEY1
Caption = "OUT_KEY(""21"")"
Height = 495
Left = 5160
TabIndex = 21
Top = 4560
Width = 2415
End
Begin VB.CommandButton OUT_KEY
Caption = "OUT_KEY(""80"")"
Height = 495
Left = 120
TabIndex = 20
Top = 5160
Width = 2415
End
Begin VB.CommandButton Credit_For_Load
Caption = "UNBLOCK"
Height = 495
Left = 120
TabIndex = 19
Top = 4560
Width = 2415
End
Begin VB.CommandButton Reset
Caption = "Reset"
Height = 495
Left = 120
TabIndex = 18
Top = 960
Width = 2415
End
Begin VB.CommandButton delete
Caption = "Delete"
Height = 495
Left = 2640
TabIndex = 17
Top = 960
End
Begin VB.CommandButton Get_Challenge
Caption = "Get_Challenge"
Height = 495
Left = 5160
TabIndex = 16
Top = 1560
Width = 2415
End
Begin VB.CommandButton Create_File
Caption = "Create_File"
Height = 495
Left = 5160
TabIndex = 15
Top = 960
Width = 2415
End
Begin VB.CommandButton Select_File
Caption = "Select_File"
Height = 495
Left = 120
TabIndex = 14
Top = 1560
Width = 2415
End
Begin VB.CommandButton External_Authentication
Caption = "External_Authentication"
Height = 495
Left = 120
TabIndex = 13
Top = 2160
Width = 2415
End
Begin VB.CommandButton Write_Key
Caption = "Write_Key"
Height = 495
Left = 2640
TabIndex = 12
Width = 2415
End
Begin VB.CommandButton Internal_authentication
Caption = "Internal_Authentication"
Height = 495
Left = 2640
TabIndex = 11
Top = 2160
Width = 2415
End
Begin VB.CommandButton Verfiy
Caption = "Verfiy"
Height = 495
Left = 5160
TabIndex = 10
Top = 2160
Width = 2415
End
Begin VB.CommandButton Change_PIN
Caption = "Change_PIN"
Height = 495
Left = 120
TabIndex = 9
Top = 2760
Width = 2415
End
Begin VB.CommandButton Update_Record
Caption = "Update_Record"
Height = 495
Left = 2640
TabIndex = 8
Top = 2760
Width = 2415
End
Begin VB.CommandButton Read_Record
Caption = "Read_Record"
Height = 495
Left = 5160
TabIndex = 7
Top = 2760
Width = 2415
End
Begin VB.CommandButton Update_Binary
Caption = "Update_Binary"
Height = 495
Left = 120
TabIndex = 6
Top = 3360
Width = 2415
End
Begin VB.CommandButton Read_Binary
Caption = "Read_Binary"
Height = 495
Left = 2640
TabIndex = 5
Top = 3360
Width = 2415
End
Begin VB.CommandButton Command2
Caption = "Application_Block"
Height = 495
Left = 5160
TabIndex = 4
Top = 3360
Width = 2415
End
Begin VB.CommandButton Application_Unblock
Caption = "Application_Unblock"
Height = 495
Left = 120
TabIndex = 3
Top = 3960
Width = 2415
End
Begin VB.CommandButton PIN_Unblock
Caption = "PIN_Unblock"
Height = 495
Left = 2640
TabIndex = 2
Top = 3960
Width = 2415
End
Begin VB.CommandButton Reload_PIN
Caption = "Reload_PIN"
Height = 495
Left = 5160
TabIndex = 1
Top = 3960
Width = 2415
End
Begin VB.CommandButton Chinese
Caption = "Chinese"
Height = 495
Left = 2640
TabIndex = 0
Top = 5760
Width = 2415
End
Begin MWAX.MWactiveX MW
Left = 0
Top = 0
_ExtentX = 2990
_ExtentY = 1508
End
End
Attribute VB_Name = "exampsam"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Application_Unblock_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_Psam(geU_CreateMF, "FFFFFFFFFFFFFFFF0f011234567890")
If Not mbRet Then MsgBox MW.Errshow
'建DF
mbRet = MW.Create_File_Psam(geU_CreateDF, "00020f001234567890")
If Not mbRet Then MsgBox MW.Errshow
'建EF(二進制文件)
mbRet = MW.Create_File_Psam(geU_CreateEF, "0003000f0f0020")
If Not mbRet Then MsgBox MW.Errshow
'建EF(key文件)
mbRet = MW.Create_File_Psam(geU_CreateEF, "0004050f000619")
If Not mbRet Then MsgBox MW.Errshow
'建結束DF
mbRet = MW.Create_File_Psam(geU_CreateEndDF, "0002")
If Not mbRet Then MsgBox MW.Errshow
'建結束MF
mbRet = MW.Create_File_Psam(geU_CreateEndMF, "")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File_Psam(geU_SelectMF, "3f00")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File_Psam(geU_SelectDF, "0002")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key_Psam(geU_WordInstall, "", "", "0100010f000f3312345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File_Psam(geU_SelectDF, "0002")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Application_Block_Psam(geU_TempKey16, "12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
'**********************************
mbRet = MW.Application_Unblock("12345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
'**********************************
End Sub
Private Sub Change_PIN_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_Psam(geU_CreateMF, "FFFFFFFFFFFFFFFF0f011234567890")
If Not mbRet Then MsgBox MW.Errshow
'建DF
mbRet = MW.Create_File_Psam(geU_CreateDF, "00020f001234567890")
If Not mbRet Then MsgBox MW.Errshow
'建EF(二進制文件)
mbRet = MW.Create_File_Psam(geU_CreateEF, "0003000f0f0020")
If Not mbRet Then MsgBox MW.Errshow
'建EF(key文件)
mbRet = MW.Create_File_Psam(geU_CreateEF, "0004050f000619")
If Not mbRet Then MsgBox MW.Errshow
'建結束DF
mbRet = MW.Create_File_Psam(geU_CreateEndDF, "0002")
If Not mbRet Then MsgBox MW.Errshow
'建結束MF
mbRet = MW.Create_File_Psam(geU_CreateEndMF, "")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File_Psam(geU_SelectMF, "3f00")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File_Psam(geU_SelectDF, "0002")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key_Psam(geU_WordInstall, "", "", "0100000f000f3312345678901234567890123456789012")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Write_Key_Psam(geU_WordInstall, "", "", "01000B0f000f331234")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File_Psam(geU_SelectMF, "3f00")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File(geU_SelectMF, "3f00")
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Select_File(geU_SelectDF, "0002")
If Not mbRet Then MsgBox MW.Errshow
'**********************************
mbRet = MW.Change_PIN("1234", "5678")
If Not mbRet Then MsgBox MW.Errshow
'**********************************
mbRet = MW.Verify("5678")
If Not mbRet Then MsgBox MW.Errshow
End Sub
Private Sub Chinese_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_Psam(geU_CreateMF, "FFFFFFFFFFFFFFFF0f011234567890")
If Not mbRet Then MsgBox MW.Errshow
'建EF(定長記錄文件)
mbRet = MW.Create_File_Psam(geU_CreateEF, "0003000f0f0020")
If Not mbRet Then MsgBox MW.Errshow
'建結束MF
mbRet = MW.Create_File_Psam(geU_CreateEndMF, "")
If Not mbRet Then MsgBox MW.Errshow
Dim pbIn(8) As Byte
'**********************************
mbRet = MW.ChineseString_DoubleByte("相約98", pbIn())
If Not mbRet Then MsgBox MW.Errshow
'**********************************
mbRet = MW.Update_Binary_Psam(geU_Data, "83", 0, 8, pbIn())
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Read_Binary_Psam("83", 0, 8, pbIn())
If Not mbRet Then MsgBox MW.Errshow
Dim psOut As String
'**********************************
mbRet = MW.DoubleByte_ChineseString(psOut, pbIn(), 8)
If Not mbRet Then MsgBox MW.Errshow
'**********************************
End Sub
Private Sub Command2_Click()
'上卡座
mbRet = MW.Reset
If Not mbRet Then MsgBox MW.Errshow
mbRet = MW.Delete
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -