以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助] API函数用法  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=70983)

--  作者:sjx71
--  发布时间:2015/7/2 16:38:00
--  [求助] API函数用法
 

Public Declare Function CVR_InitComm Lib "termb.dll" Alias "CVR_InitComm" (ByVal Port As Integer) As Integer \'连接设备
Public Declare Function
CVR_Authenticate Lib "termb.dll" Alias "CVR_Authenticate" () As Integer \'验证身份证
Public Declare Function
CVR_Read_Content Lib "termb.dll" Alias "CVR_Read_Content" (ByVal Active As Integer) As Integer \'读取身份证信息
Public Declare Function
CVR_CloseComm Lib "termb.dll" Alias "CVR_CloseComm" () As Integer
\'关闭设备

 

上边定义中 以第3句为例

 

两个CVR_Read_Content 各代表什么意思

 

第一个代表可以在其他地方引用的函数的名称?

第二个代表在dll 文件中的函数名称?

 

(ByVal active  as Integer) 代表什么意思

函数需要一个整数类型的参数?

 

As Integer

返回一个整数?

 

ByVal 与 ByRef 各用在什么情况下比较好


--  作者:大红袍
--  发布时间:2015/7/2 17:01:00
--  

 参考 http://www10.zzu.edu.cn/ie_wangjunfeng/daquan/sentence/contents/Declare.html

 


--  作者:大红袍
--  发布时间:2015/7/2 17:02:00
--  

https://msdn.microsoft.com/zh-cn/library/4zey12w5%28VS.80%29.aspx

 


--  作者:sjx71
--  发布时间:2015/7/2 17:19:00
--  

谢谢老师