vb编写activeX控件实现b/s架构上与硬件操作

 Private Declare Function openC Lib "YKTClient.dll" Alias _
"ykt_opencard" (ByVal nDeviceType As Long, ByVal nCom As Long, ByVal nBaud As Long, ByVal pRegion As String, ByVal pErrmsg As String) As Long
'读取尚未个人化的正式卡
Private Declare Function ykt_readcardno Lib "YKTClient.dll" Alias _
"ykt_readopeninitcardno" (ByVal pRegion As String, ByVal pDeptid As String, ByVal pDeptpass As String, ByVal pCardno As String, ByVal pCardtype As String, ByVal pErrmsg As String) As Long
Private Declare Function closeC Lib "YKTClient.dll" Alias _
"ykt_closecard" (ByVal pErrmsg As String) As Long
'读正式卡
Private Declare Function ykt_readcardno2 Lib "YKTClient.dll" Alias _
"ykt_readopencardno" (ByVal pRegion As String, ByVal pDeptid As String, ByVal pDeptpass As String, ByVal pCardno As String, ByVal pCardtype As String, ByVal pErrmsg As String) As Long
Public Function getcardtype() As String
   Dim status As Long
   Dim pRegion As String
   pRegion = Space$(2)
   pRegion = "XM"
   Dim pCardno As String
   pCardno = Space$(16)
   Dim pCardtype As String
   pCardtype = Space$(1)
   Dim pErrmsg As String
   pErrmsg = Space$(1024)
   status = ykt_readcardno(pRegion, "1111", "111111", pCardno, pCardtype, pErrmsg)
getcardtype = pCardtype
End Function
Public Function opencard() As Long
 
  Dim pErrmsg As String
   pErrmsg = Space$(1024)
   Dim pRegion As String
   pRegion = Space$(2)
   pRegion = "XM"
   Dim flag As Long
 
   flag = openC(10, 9, 3, pRegion, pErrmsg)

End Function
Public Function closecard() As Long
   Dim pErrmsg As String
   pErrmsg = Space$(1024)
   Dim flag As Long
   flag = closeC(pErrmsg)
End Function
Public Function read() As String
Dim card As String
Dim status As Long
status = opencard()
If status = 0 Then '卡具打开成功
   Dim pRegion As String
   pRegion = Space$(2)
   pRegion = "XM"
   Dim pCardno As String
   pCardno = Space$(16)
   Dim pCardtype As String
   pCardtype = Space$(1)
   Dim pErrmsg As String
   pErrmsg = Space$(1024)
   Dim type_ As String
  
   type_ = getcardtype()
   If type_ = "A" Then '正式卡
       status = ykt_readcardno(pRegion, "1111", "111111", pCardno, pCardtype, pErrmsg)
   ElseIf type_ = "B" Then '临时卡
  
   Else
       status = ykt_readcardno2(pRegion, "1111", "111111", pCardno, pCardtype, pErrmsg)
   End If
   status = closecard()  '否则关闭卡具
End If
read = pCardno
End Function
这是我自己设计的图书管理系统,包括用VB+MSSQL2000做的C/S版和用JSP+JAVABEAN+MSSQL2000做的B/S版,包含B/S版源码,C/S版源码,数据库中不仅有分离的数据库,而且还有可以用来建库的语句,附带有比较完整的说明稳当,全部给大家了,小弟初学编程,有什么不足的麻烦指出,JAVABEAN的源码请用JBUILDER9或JBUILDER2005打开` 希望大家下载/使用后能给个分数顺便评论下,谢谢了~ 【摘要】 图书管理系统是典型的信息管理系统,其开发主要方面包括前台的应用程序的开发和后台数据库的建立和维护。本图书管理系统分为两个版本,分别为 浏览器/服务器版 和 客户端/服务器版。浏览器/服务器版的图书管理系统采用的是Jsp + JavaBean两层开发模式,客户端/服务器版采用微软公司的Visual Basic 6.0 工具进行开发。作为图书管理系统的核心,数据库系统采用了微软公司功能强大的Microsoft SQL Server 2000作为数据库服务器。开发过程中不断修改和改进,最终形成界面美观、功能实用、操作简便的图书管理系统。 【目录】 摘要 系统设计分析 §1.1 前言 §1.2 系统需求分析 §1.3 数据库设计 §1.4 系统流程设计 图书管理系统(浏览器/服务器版) §2.1 系统界面设计 §2.2 系统环境配置 §2.3 系统操作手册 §2.4 系统开发历程 图书管理系统(客户端/服务器版) §3.1 系统界面设计 §3.2 系统环境配置 §3.3 系统操作手册 §3.4 系统开发历程
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值