'function ReadIcCard(ComName:Pchar;out sIcNo, sEmpNo, sEmpName, sEmpSex, sPassword,
' sEmpUnitName, sEmpRylb, sEmpQxh, InHosp, HospCode: shortstring;
' var intHospNum, intOldYear: integer;
' var curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ: Double): integer; export;
'上面是delphi写的DLL函数定义原形,在VB里面怎么定义啊??
'注意:不要说DLL有问题,因为已经有人使用了.哈哈
'下面是我写的没有成功Private Declare Function ReadIcCard Lib "HospPolicy.dll" (ByVal ComName As String, ByRef sIcNo As String, _
ByRef sEmpNo As String, ByRef sEmpName As String, ByRef sEmpSex As String, ByRef sPassWord As String, _
ByRef sEmpUnitName As String, ByRef sEmpRylb As String, ByRef sEmpQxh As String, ByRef InHosp As String, _
ByRef HospCode As String, ByRef intHospNum As Integer, ByRef intOldYear As Integer, ByRef curNNTcyz As Double, _
ByRef curNNDEYZ As Double, ByRef curMTYZ As Double, ByRef GZYE As Double, ByRef MZQFLJ As Double) As LongPrivate Sub Command1_Click()
Dim ichandle As Long
Dim ComName As String
Dim sIcNo As String
Dim sEmpNo As String
Dim sEmpName As String
Dim sEmpSex As String
Dim sPassWord As String
Dim sEmpUnitName As String
Dim sEmpRylb As String
Dim sEmpQxh As String
Dim InHosp As String
Dim HospCode As String Dim intHospNum, intOldYear As Integer
Dim curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ As Double
ComName = "COM1"
ichandle = ReadIcCard(ComName, sIcNo, sEmpNo, sEmpName, sEmpSex, _
sPassWord, sEmpUnitName, sEmpRylb, sEmpQxh, InHosp, HospCode, _
intHospNum, intOldYear, curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ)
If ichandle = 0 Then
MsgBox ("NOT")
End If
End Sub
' sEmpUnitName, sEmpRylb, sEmpQxh, InHosp, HospCode: shortstring;
' var intHospNum, intOldYear: integer;
' var curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ: Double): integer; export;
'上面是delphi写的DLL函数定义原形,在VB里面怎么定义啊??
'注意:不要说DLL有问题,因为已经有人使用了.哈哈
'下面是我写的没有成功Private Declare Function ReadIcCard Lib "HospPolicy.dll" (ByVal ComName As String, ByRef sIcNo As String, _
ByRef sEmpNo As String, ByRef sEmpName As String, ByRef sEmpSex As String, ByRef sPassWord As String, _
ByRef sEmpUnitName As String, ByRef sEmpRylb As String, ByRef sEmpQxh As String, ByRef InHosp As String, _
ByRef HospCode As String, ByRef intHospNum As Integer, ByRef intOldYear As Integer, ByRef curNNTcyz As Double, _
ByRef curNNDEYZ As Double, ByRef curMTYZ As Double, ByRef GZYE As Double, ByRef MZQFLJ As Double) As LongPrivate Sub Command1_Click()
Dim ichandle As Long
Dim ComName As String
Dim sIcNo As String
Dim sEmpNo As String
Dim sEmpName As String
Dim sEmpSex As String
Dim sPassWord As String
Dim sEmpUnitName As String
Dim sEmpRylb As String
Dim sEmpQxh As String
Dim InHosp As String
Dim HospCode As String Dim intHospNum, intOldYear As Integer
Dim curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ As Double
ComName = "COM1"
ichandle = ReadIcCard(ComName, sIcNo, sEmpNo, sEmpName, sEmpSex, _
sPassWord, sEmpUnitName, sEmpRylb, sEmpQxh, InHosp, HospCode, _
intHospNum, intOldYear, curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ)
If ichandle = 0 Then
MsgBox ("NOT")
End If
End Sub
解决方案 »
- like +'''+text1.text+'''+'%'''这三个撇怎么分,
- 怎样解决SQL Server中保存的简体中文数据在英文操作系统显示的问题??
- VB + Jet + Excel 的非中文搜索出错.
- 请问为什么我的w2kserver中的vb6的"数据窗体向导"点击了没有反应?
- 请教:我在form中拖动DBGrid控件时,出现“该部件的许可信息没找到”,我想问问怎样使之有许可证。
- 谁能给个msdn下载,google搜到的都是空连接。
- 如何用VB打开一个全屏的Html,并让这个Html显示在最前面
- 关于ADO的问题,懂一点的进来看看。
- 为什么小vb中left()用不了?
- *******我想把GRID当类似EXCLE的表使,不绑定到记录集上,然后手动的向其中添些数据.应怎样做?用哪个GRID控件?应该用哪个GRID?请各位大侠多多指教!!!!!*******
- 如何将存储过程中的纪录集调入datagrid中?请大家帮我找找错误!!
- 窗口坐标和屏幕坐标的互相转换问题
ByRef sEmpNo As String, ByRef sEmpName As String, ByRef sEmpSex As String, ByRef sPassWord As String, _
ByRef sEmpUnitName As String, ByRef sEmpRylb As String, ByRef sEmpQxh As String, ByRef InHosp As String, _
ByRef HospCode As String, ByVal intHospNum As Integer, ByVal intOldYear As Integer, ByRef curNNTcyz As Double, _
ByVal curNNDEYZ As Double, ByVal curMTYZ As Double, ByVal GZYE As Double, ByVal MZQFLJ As Double) As Integer
' sEmpUnitName, sEmpRylb, sEmpQxh, InHosp, HospCode: shortstring;
' var intHospNum, intOldYear: integer;
' var curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ: Double): integer; export;
Private Declare Function ReadIcCard Lib "HospPolicy.dll" (ByVal ComName As String, ByRef sIcNo As String, _
ByRef sEmpNo As String, ByRef sEmpName As String, ByRef sEmpSex As String, ByRef sPassWord As String, _
ByRef sEmpUnitName As String, ByRef sEmpRylb As String, ByRef sEmpQxh As String, ByRef InHosp As String, _
ByRef HospCode As String, ByRef intHospNum As Integer, ByRef intOldYear As Integer, ByRef curNNTcyz As Double, _
ByRef curNNDEYZ As Double, ByRef curMTYZ As Double, ByRef GZYE As Double, ByRef MZQFLJ As Double) As Integer
Private Sub Command1_Click()
Dim ichandle As Integer
Dim ComName As String
Dim sIcNo(255) As String
Dim sEmpNo(255) As String
Dim sEmpName(255) As String
Dim sEmpSex(255) As String
Dim sPassWord(255) As String
Dim sEmpUnitName(255) As String
Dim sEmpRylb(255) As String
Dim sEmpQxh(255) As String
Dim InHosp(255) As String
Dim HospCode(255) As String Dim intHospNum As Integer
Dim intOldYear As Integer
Dim curNNTcyz As Double
Dim curNNDEYZ As Double
Dim curMTYZ As Double
Dim GZYE As Double
Dim MZQFLJ As Double
ComName = "COM1"
ichandle = ReadIcCard(ByVal ComName, sIcNo(0), sEmpNo(0), sEmpName(0), sEmpSex(0), _
sPassWord(0), sEmpUnitName(0), sEmpRylb(0), sEmpQxh(0), InHosp(0), HospCode(0), _
intHospNum, intOldYear, curNNTcyz, curNNDEYZ, curMTYZ, GZYE, MZQFLJ)
If ichandle = 0 Then
MsgBox ("NOT")
End If
End Sub
---------------------------
工程1: 工程1.exe - 应用程序错误
---------------------------
"0x779b953b" 指令引用的 "0x3138392c" 内存。该内存不能为 "read"。
要终止程序,请单击“确定”。
要调试程序,请单击“取消”。
---------------------------
确定 取消
---------------------------
提示上面的错误!!晕啊