Mifare_SDK_Sample

所属分类:其他行业
开发工具:Visual Basic
文件大小:261KB
下载次数:78
上传日期:2009-02-17 09:48:07
上 传 者Timo.AIDC
说明:  Mifare SDK - VB Sample Program
(Mifare SDK- VB Sample Program)

文件列表:
UsbMiCard.dll (1388629, 2008-08-13)
frmConverter.frm (14514, 2008-02-29)
frmConverter.frx (12, 2008-02-29)
frmMifareUSB_4K.frm (96135, 2009-02-05)
frmMifareUSB_4K.frx (20087, 2009-02-05)
MifareSDK.vbp (1104, 2009-02-05)
modDLL.bas (1992, 2008-07-07)
modGeneral.bas (3900, 2009-01-23)
modMifare.bas (2439, 2008-07-02)

USBMiCard.Dll (Last update : 25 Feb 2008) ------------------------------------------ Windows Dynamic Link Library to interact with Mifare Reader. Following are the functions provide by the library : Public Declare Function MifUSB_OpenDevice Lib "UsbMiCard.dll" () As Long Public Declare Function MifUSB_CloseDevice Lib "UsbMiCard.dll" () As Long Public Declare Function MifUSB_SetBeep Lib "UsbMiCard.dll" (ByVal nFlag As Integer) As Long Public Declare Function MifUSB_SetRedLed Lib "UsbMiCard.dll" (ByVal nFlag As Integer) As Long Public Declare Function MifUSB_SetGreenLed Lib "UsbMiCard.dll" (ByVal nFlag As Integer) As Long Public Declare Function MifUSB_TransKey Lib "UsbMiCard.dll" (ByVal intSector As Integer, ByRef byteData As udfTransKey) As Long Public Declare Function MifUSB_GetCardType Lib "UsbMiCard.dll" (ByRef lngCardType As Long) As Long Public Declare Function MifUSB_GetCardSN Lib "UsbMiCard.dll" (ByRef lngCardSN As Long) As String Public Declare Function MifUSB_ReadBlock Lib "UsbMiCard.dll" (ByVal intBlock As Integer, ByVal lngCardSN As Long, ByVal intMode As Integer) As String Public Declare Function MifUSB_ReadBlockEx Lib "UsbMiCard.dll" (ByVal intSector As Integer, ByVal intBlock As Integer, ByVal lngCardSN As Long, ByVal intMode As Integer, ByRef byteData As udfTransKey) As String Public Declare Function MifUSB_WriteBlock Lib "UsbMiCard.dll" (ByVal intBlock As Integer, ByVal lngCardSN As Long, ByVal intMode As Integer, ByRef byteData As udfBlockData) As Long Public Declare Function MifUSB_WriteBlockEx Lib "UsbMiCard.dll" (ByVal intSector As Integer, ByVal intBlock As Integer, ByVal lngCardSN As Long, ByVal intMode As Integer, ByRef byteData As udfTransKey, ByRef byteData As udfBlockData) As Long 1. MifUSB_OpenDevice : function to handle open the communication with the reader thru USB. this function MUST BE called at the first time before you call the other function. long MifUSB_OpenDevice(); Para : none Return : 0 = SUCCESS 1 = FAILURE 2. MifUSB_CloseDevice : function to handle close the communication long MifUSB_OpenDevice(); Para : none Return : 0 = SUCCESS 1 = FAILURE 3. MifUSB_SetBeep : function to turn buzzer / beep on or off. long MifUSB_SetBeep(int nFlag); Para : nFlag --> Flag indicator to turn ON (1) or OFF (0) Return : 0 = SUCCESS 1 = FAILURE 4. MifUSB_SetRedLed : function to turn Red LED on or off. long MifUSB_SetRedLed(int nFlag); Para : nFlag --> Flag indicator to turn ON (1) or OFF (0) Return : 0 = SUCCESS 1 = FAILURE 5. MifUSB_SetGreenLed : function to turn Green LED on or off. long MifUSB_SetGreenLed(int nFlag); Para : nFlag --> Flag indicator to turn ON (1) or OFF (0) Return : 0 = SUCCESS 1 = FAILURE 6. MifUSB_GetCardSN : function to read the serial number of Mifare Card. LPSTR MifUSB_GetCardSN(long lngCardSN); Para : lngCardSN Return : card serial number 7. MifUSB_GetCardType : function to read the type of Mifare Card. long MifUSB_GetCardType(long lngCardType); Para : lngCardType Return : card type 8. MifUSB_TransKey : function to submit the access key to the reader. long MifUSB_TransKey(int nSector, BYTE byteKey); Para : nSector --> sector number on Mifare card (0 ~ 15) byteKey --> the access key for its sector Return : 0 = SUCCESS 1 = FAILURE 9. MifUSB_ReadBlock : function to read the data from certain block data on the Mifare card. LPSTR MifUSB_ReadBlock(int nBlock, long lngCardSN, int nMode); Para : nBlock --> given the block data to be read (0 ~ 63) lngCardSN --> the card S/N for current Mifare card nMode --> 0=KeyA or 1=KeyB Return : - NAK = if failure , or - Data on hex format 10. MifUSB_ReadBlockEx : function to read the data from certain block data on the Mifare card. LPSTR MifUSB_ReadBlockEx(int nSector, int nBlock, long lngCardSN, int nMode, BYTE byteKey); Para : nSector --> given the sector data to be read (0 ~ 15) nBlock --> given the block data to be read (0 ~ 3) lngCardSN --> the card S/N for current Mifare card nMode --> 0=KeyA or 1=KeyB byteKey --> the access key for read data Return : - NAK = if failure , or - Data on hex format 11. MifUSB_WriteBlock : function to write the data into Mifare card. long MifUSB_WriteBlock(int nBlock, long lngCardSN, int nMode, BYTE byteData); Para : nBlock --> given the block where the data to be stored (0 ~ 63) lngCardSN --> the card S/N for current Mifare card nMode --> 0=KeyA or 1=KeyB byteData --> data to be written on the Mifare card Return : 0 = SUCCESS 1 = FAILURE 12. MifUSB_WriteBlockEx : function to write the data into Mifare card. long MifUSB_WriteBlockEx(int nSector, int nBlock, long lngCardSN, int nMode, BYTE byteKey, BYTE byteData); Para : nSector --> given the sector where the data to be stored (0 ~ 15) nBlock --> given the block where the data to be stored (0 ~ 3) lngCardSN --> the card S/N for current Mifare card nMode --> 0=KeyA or 1=KeyB byteData --> data to be written on the Mifare card byteKey --> the access key for write data Return : 0 = SUCCESS 1 = FAILURE

近期下载者

相关文件


收藏者