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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
| [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_OpenComm", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern long OpenComm(ref byte comm, long nBoudrate);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_CloseComm", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int CloseComm(long handle);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_PCDRead", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_PCDRead(int handle, int deviceAddr, byte mode, byte blk_Addr, byte Num_blk, ref byte snr, ref byte Buffer);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_PCDWrite", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_PCDWrite(int handle, int deviceAddr, byte mode, byte blk_Addr, byte Num_blk, ref byte snr, ref byte Buffer);
//设置通讯地址 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_SetDeviceAddress", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_SetDeviceAddress(int handle, int deviceAddr, byte new_Addr, ref byte Buffer);
//计算机的比特率 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_SetBandrate", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_SetBandrate(int handle, int deviceAddr, byte newBaud, ref byte Buffer);
//设置灯的工作状态,包括,灯亮的周期以及循环的次数 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_ControlLED", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_ControlLED(int handle, int deviceAddr, byte freq, byte duration, ref byte Buffer);
//设置灯的工作状态,包括,灯亮的周期以及循环的次数 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_ControlBuzzer", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_ControlBuzzer(int handle, int deviceAddr, byte freq, byte duration, ref byte Buffer);
//读取由厂家预设的1个字节的读卡器地址和8个字节序列号 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_GetSerNum", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_GetSerNum(int handle, int deviceAddr, ref byte Buffer);
//读取由厂家预设的1个字节的读卡器地址和8个字节序列号 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_SetSerNum", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_SetSerNum(int handle, int deviceAddr, ref byte newvalue, ref byte Buffer);
//自动读取卡Ultralight的卡号 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "UL_Request", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int UL_Request(int handle, int deviceAddr, byte mode, ref byte snr);
//选择卡,使卡进入被中断的状态… [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "MF_Halt", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int MF_Halt(int handle, int deviceAddr); //读取卡中指定扇区的数据 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "UL_HLRead", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int UL_HLRead(int handle, int deviceAddr, byte mode, byte blk_Addr, ref byte snr, ref byte Buffer);
//写取卡中指定扇区的数据 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "UL_HLWrite", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int UL_HLWrite(int handle, int deviceAddr, byte mode, byte blk_Addr, ref byte snr, ref byte Buffer);
//写取卡中指定扇区的数据 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "ISO15693_Inventory", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int ISO15693_Inventory(int handle, int deviceAddr, ref byte snr, ref byte Buffer);
//读取数据 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_ISO15693Read", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_ISO15693Read(int handle, int deviceAddr, byte flags, int blk_Addr, int Num_blk, ref byte uid, ref byte Buffer);
//写数据 [System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_ISO15693Write", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_ISO15693Write(int handle, int deviceAddr, byte flags, int blk_Addr, int Num_blk, ref byte uid, ref byte Buffer);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_PCDInitVal", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_PCDInitVal(int handle, int deviceAddr, byte mode, byte Num_blk, ref byte snr, ref byte Buffer);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_PCDDec", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_PCDDec(int handle, int deviceAddr, byte mode, byte Num_blk, ref byte snr, ref byte Buffer);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "API_PCDInc", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int API_PCDInc(int handle, int deviceAddr, byte mode, byte Num_blk, ref byte snr, ref byte Buffer);
[System.Runtime.InteropServices.DllImport("mi.dll", EntryPoint = "GET_SNR", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern int GET_SNR(int handle, int deviceAddr, byte mode, byte half, ref byte snr, ref byte Buffer);
|