资源简介
读卡器集成明泰mt8南天bp8903-d源码,支持身份证、银行卡、磁条卡。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.IO;
namespace DoctorCardRead
{
public class ManTianDll
{
///
/// 打开串口
///
/// 串口号 如:1,2,12,13
/// 扩展口 如:”” NULL “A” “B”
/// 串口波特率 如:9600115200
/// 超时时间 如:1530单位为秒
/// 0表示成功
[DllImport(“libSource.dll“ EntryPoint = “OpenComPort“ SetLastError = true CharSet = CharSet.Auto ExactSpelling = false CallingConvention = CallingConvention.StdCall)]
public static extern int OpenComPort(int nPort [MarshalAs(UnmanagedType.LPArray)]byte[] gate int baud int timeout);
///
/// 串口是否打开
///
/// 1 串口已打开0 串口未打开
[DllImport(“libSource.dll“ EntryPoint = “IsComOpen“ SetLastError = true CharSet = CharSet.Auto ExactSpelling = false CallingConvention = CallingConvention.StdCall)]
public static extern int IsComOpen();
///
/// 串口关闭
///
[DllImport(“libSource.dll“ EntryPoint = “CloseComPort“ SetLastError = true CharSet = CharSet.Auto ExactSpelling = false CallingConvention = CallingConvention.StdCall)]
public static extern void CloseComPort();
///
/// 获取错误信息的文字描述
///
/// 输出缓冲区起始地址
///
[DllImport(“libSource.dll“ EntryPoint = “GetDeviceErrInfo“ SetLastError = true CharSet = CharSet.Auto ExactSpelling = false CallingConvention = CallingConvention.StdCall)]
public static extern void GetDeviceErrInfo([MarshalAs(UnmanagedType.LPArray)]byte[] buf int bufsize);
///
/// 读磁条信息
///
/// mode 磁条模式,2 二磁道,3 三磁道,23 二三磁道
/// 读取到的2磁道数据
/// 读取到的3磁道数据
///
[DllImport(“libSource.dll“ EntryPoint = “ReadCard“ SetLastError = true CharSet = CharSet.Auto ExactSpelling = false CallingConvention = CallingConvention.StdCall)]
public static extern int ReadCard(int mode [MarshalAs(UnmanagedType.LPArray)]byte[] tr2Data [MarshalAs(UnmanagedType.LPArray)]byte[] tr3Data);
///
/// 获取银行磁卡号,自动。
///
/// 串口号
/// 扩展口
/// 超时时间
/// 获取到的卡号
///
[DllImport(“libSource.dll“ EntryPoint = “GetCardNumberFromDev“ SetLastError = tr
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-03-14 14:32 CardRead程序运行\
文件 90112 2014-08-28 11:39 CardRead程序运行\GetInfo.dll
文件 380928 2014-03-19 16:00 CardRead程序运行\MantianICRead.dll
文件 255488 2015-04-07 00:00 CardRead程序运行\MantianRead.dll
文件 7680 2015-07-31 19:59 CardRead程序运行\MySave.dll
文件 309 2016-03-14 14:16 CardRead程序运行\ReadCardCofig.xm
文件 12800 2016-03-14 14:19 CardRead程序运行\WindowsFormsApplication1.exe
文件 32256 2016-03-14 14:19 CardRead程序运行\WindowsFormsApplication1.pdb
文件 11600 2016-03-14 14:28 CardRead程序运行\WindowsFormsApplication1.vshost.exe
文件 490 2015-03-30 17:36 CardRead程序运行\WindowsFormsApplication1.vshost.exe.manifest
文件 24012 2016-03-14 14:32 CardRead程序运行\mt8_read.xm
文件 23552 2016-03-14 14:32 CardRead程序运行\mt8_read.dll
文件 73216 2016-03-14 14:19 CardRead程序运行\mt8_read.pdb
文件 8220 2016-03-14 14:32 CardRead程序运行\mt8_read.tlb
文件 221184 2014-08-28 11:39 CardRead程序运行\mtx_32.dll
目录 0 2016-03-08 18:25 DoctorCardRead\
文件 3519 2016-03-07 17:15 DoctorCardRead\DoctorCardRead.csproj
文件 4168 2016-03-08 18:25 DoctorCardRead\ManTian.cs
目录 0 2016-03-07 17:15 DoctorCardRead\Properties\
文件 1432 2016-03-07 17:15 DoctorCardRead\Properties\AssemblyInfo.cs
目录 0 2016-03-07 16:43 DoctorCardRead\bin\
目录 0 2017-01-05 20:59 DoctorCardRead\bin\Debug\
目录 0 2016-03-07 16:43 DoctorCardRead\bin\x86\
目录 0 2017-01-05 20:59 DoctorCardRead\bin\x86\Debug\
目录 0 2016-03-07 16:43 DoctorCardRead\obj\
目录 0 2016-03-07 15:33 DoctorCardRead\obj\Debug\
目录 0 2017-01-05 20:59 DoctorCardRead\obj\Debug\Refactor\
目录 0 2017-01-05 20:59 DoctorCardRead\obj\Debug\TempPE\
目录 0 2016-03-07 16:43 DoctorCardRead\obj\x86\
目录 0 2016-03-10 20:15 DoctorCardRead\obj\x86\Debug\
文件 546 2016-03-07 17:18 DoctorCardRead\obj\x86\Debug\DoctorCardRead.csproj.FileListAbsolute.txt
............此处省略94个文件信息
评论
共有 条评论