/// <summary> /// 连接读卡器 /// </summary> /// <param name="msg">输出信息</param> /// <returns>是否成功</returns> public override bool DevOpen(out string msg) { msg = "读卡器连接成功!"; bool res = true; int st = 0; st = ReaderDllMethod.mwDevOpen("USB", "", out handle); //打开读写器 if (st < 0) { msg = ReaderDllMethod.getErrMsg(st); res = false; } else { DevBeep(1, 1, 3); } return(res); }