明华 mwrf32 相关Api文档
2013-05-30 14:23
225 查看
[DllImport("mwrf32.dll", EntryPoint = "rf_init", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_init(Int16 port, long baud);
//取得读写器硬件版本号
[DllImport("mwrf32.dll", EntryPoint = "rf_get_status", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_get_status(Int16 icdev, byte* banben);
/// <summary>
///鸣叫
/// </summary>
/// <param name="icdev"></param>
/// <param name="banben"></param>
/// <returns></returns>
[DllImport("mwrf32.dll", EntryPoint = "rf_beep", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_beep(Int16 icdev, int m);
/// <summary>
///射频读写模式复位
/// </summary>
/// <param name="icdev"></param>
/// <param name="banben"></param>
/// <returns></returns>
[DllImport("mwrf32.dll", EntryPoint = "rf_reset", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_reset(Int16 icdev, int m);
//将密码装入读写模块RAM块中
[DllImport("mwrf32.dll", EntryPoint = "rf_load_key", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_load_key(Int16 icdev, byte passordmode, byte sector, byte[] passord);
//向读写器装入十六进制密码
[DllImport("mwrf32.dll", EntryPoint = "rf_load_key_hex", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_load_key_hex(int icdev, byte passordmode, byte sector, string w_passord);
//断开与读卡器的连接
[DllImport("mwrf32.dll", EntryPoint = "rf_exit", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_exit(Int16 icdev);
/*----------------------读写器操作-----------------------------------*/
/*----------------------卡操作-----------------------------------*/
//返回卡的序列号---- 防冲突
[DllImport("mwrf32.dll", EntryPoint = "rf_anticoll", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_anticoll(Int16 icdev, byte m, ulong* kahao);
//返回卡的序列号---- 寻卡
[DllImport("mwrf32.dll", EntryPoint = "rf_card", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_card(Int16 icdev, byte m, out ulong kahao);
/// <summary>
/// 寻卡
/// </summary>
/// <param name="icdev"></param>
/// <param name="m"></param>
/// <param name="kahao"></param>
/// <returns></returns>
[DllImport("mwrf32.dll", EntryPoint = "rf_request", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_request(Int16 icdev, Int16 m, uint* kahao);
//初始化块值---在进行值操作时,必须先执行初始化值函数,然后才可以读、减、加的操作
[DllImport("mwrf32.dll", EntryPoint = "rf_initval", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_initval(int icdev, int mode, byte date);
//读块值
[DllImport("mwrf32.dll", EntryPoint = "rf_initval", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_initval(Int16 icdev, Int16 adr, ulong date);
//读取卡中数据
[DllImport("mwrf32.dll", EntryPoint = "rf_read", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_read(Int16 icdev, byte mode, byte[] date);
//向卡中写数据
[DllImport("mwrf32.dll", EntryPoint = "rf_write", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_write(Int16 icdev, byte mode, byte[] date);
//验证卡某一扇区密码
[DllImport("mwrf32.dll", EntryPoint = "rf_authentication", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_authentication(Int16 icdev, byte mode, byte SecNr);
//检测指定数据是否与卡中数据一致
[DllImport("mwrf32.dll", EntryPoint = "rf_check_write", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_check_write(Int16 icdev, int snr, int authmode, int adr, byte date);
//终止该卡操作
[DllImport("mwrf32.dll", EntryPoint = "rf_halt", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_halt(int icdev);
/*----------------------卡操作-----------------------------------*/
public static extern Int16 rf_init(Int16 port, long baud);
//取得读写器硬件版本号
[DllImport("mwrf32.dll", EntryPoint = "rf_get_status", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_get_status(Int16 icdev, byte* banben);
/// <summary>
///鸣叫
/// </summary>
/// <param name="icdev"></param>
/// <param name="banben"></param>
/// <returns></returns>
[DllImport("mwrf32.dll", EntryPoint = "rf_beep", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_beep(Int16 icdev, int m);
/// <summary>
///射频读写模式复位
/// </summary>
/// <param name="icdev"></param>
/// <param name="banben"></param>
/// <returns></returns>
[DllImport("mwrf32.dll", EntryPoint = "rf_reset", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_reset(Int16 icdev, int m);
//将密码装入读写模块RAM块中
[DllImport("mwrf32.dll", EntryPoint = "rf_load_key", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_load_key(Int16 icdev, byte passordmode, byte sector, byte[] passord);
//向读写器装入十六进制密码
[DllImport("mwrf32.dll", EntryPoint = "rf_load_key_hex", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_load_key_hex(int icdev, byte passordmode, byte sector, string w_passord);
//断开与读卡器的连接
[DllImport("mwrf32.dll", EntryPoint = "rf_exit", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_exit(Int16 icdev);
/*----------------------读写器操作-----------------------------------*/
/*----------------------卡操作-----------------------------------*/
//返回卡的序列号---- 防冲突
[DllImport("mwrf32.dll", EntryPoint = "rf_anticoll", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_anticoll(Int16 icdev, byte m, ulong* kahao);
//返回卡的序列号---- 寻卡
[DllImport("mwrf32.dll", EntryPoint = "rf_card", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_card(Int16 icdev, byte m, out ulong kahao);
/// <summary>
/// 寻卡
/// </summary>
/// <param name="icdev"></param>
/// <param name="m"></param>
/// <param name="kahao"></param>
/// <returns></returns>
[DllImport("mwrf32.dll", EntryPoint = "rf_request", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_request(Int16 icdev, Int16 m, uint* kahao);
//初始化块值---在进行值操作时,必须先执行初始化值函数,然后才可以读、减、加的操作
[DllImport("mwrf32.dll", EntryPoint = "rf_initval", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_initval(int icdev, int mode, byte date);
//读块值
[DllImport("mwrf32.dll", EntryPoint = "rf_initval", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_initval(Int16 icdev, Int16 adr, ulong date);
//读取卡中数据
[DllImport("mwrf32.dll", EntryPoint = "rf_read", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_read(Int16 icdev, byte mode, byte[] date);
//向卡中写数据
[DllImport("mwrf32.dll", EntryPoint = "rf_write", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_write(Int16 icdev, byte mode, byte[] date);
//验证卡某一扇区密码
[DllImport("mwrf32.dll", EntryPoint = "rf_authentication", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_authentication(Int16 icdev, byte mode, byte SecNr);
//检测指定数据是否与卡中数据一致
[DllImport("mwrf32.dll", EntryPoint = "rf_check_write", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_check_write(Int16 icdev, int snr, int authmode, int adr, byte date);
//终止该卡操作
[DllImport("mwrf32.dll", EntryPoint = "rf_halt", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 rf_halt(int icdev);
/*----------------------卡操作-----------------------------------*/
相关文章推荐
- maven war api 相关文档说明
- 支付宝API接口开发相关文档以及实例
- ASP.NET API Helper Page 创建并生成相关帮助文档
- 亚马逊 MWS上传数据 API部分的相关内容 amazon api 文档
- spring的jar包以及相关的API文档的下载方式
- 支付宝API接口开发相关文档以及实例
- TFS图片服务器 相关文档 TFS RESTful API
- NLPIR/ICTCLAS中文分词系统 java相关api文档总结
- 前端开发相关技术API文档汇总
- 支付宝API接口开发相关文档以及实例
- ST API文档-Node-XAMPP数据库相关操作
- 相关API文档
- 开发API文档相关问题(*.chm)
- NLPIR/ICTCLAS中文分词系统 java相关api文档总结
- Android7.0中文文档(API)-- ResourceCursorTreeAdapter
- 看ExtJs API文档的阅读方法
- dom4j相关操作,生成指定的xml文档-修改id为2的学生姓名-删除id为2的学生
- Win32 Api的相关问题
- jQuery EasyUI API 中文文档 - NumberSpinner数值微调器使用介绍