110,538
社区成员
发帖
与我相关
我的任务
分享
int iRetUSB = 0;
int iPort;
int iRetCOM = 0;
for (iPort = 1001; iPort <= 1016; iPort++)
{
iRetUSB = Module_DLL.CVR_InitComm(iPort);
if (iRetUSB == 1)
{
break;
}
}
for (iPort = 1; iPort <= 4; iPort++)
{
iRetCOM = Module_DLL.CVR_InitComm(iPort);
if (iRetCOM == 1)
{
break;
}
}
if ((iRetCOM == 1) || (iRetUSB == 1))
{
//MessageBox.Show("读卡器初始化成功!");
Response.Write("<script>alert('yes')</script>");
}
else
{
// MessageBox.Show("未连接读卡器!");
Response.Write("<script>alert('no')</script>");
}