asp中调用自编VB ACTIVEX DLL组件中数组参数的问题

freeasfish 2001-10-16 09:58:37
activex dll prog ID "reportdata.access"

Public Sub GetReportFileName(strName() As Variant, intNum() As Variant)
strName(0) = "MR"
strName(1) = "zhang"
intNum(0) = 1
intNum(1) = 1
End Sub

asp文件
<html>
<body>
<%
ReDim strIn(10)
ReDim numIn(10)
Set obj = Server.createObject("reportdata.access")
obj.GetReportFileName strIn, numIn
set obj = nothing

Public Sub GetReportFileName(strName() , intNum() )
strName(0) = "MR"
strName(1) = "zhang"
intNum(0) = 1
intNum(1) = 1
End Sub

%>
<%=strIn(0)%>
<br>
<%=strIn(1)%>
</body>
</html>
调用时出问题,参数类型不匹配
修改obj.GetReportFileName strIn, numIn为
GetReportFileName strIn, numIn调用asp中函数,结果正常
但asp中函数与activex dll中函数相同!
怎么传数组给vb activex dll?
谢谢
...全文
134 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yxh_yzh 2001-12-01
  • 打赏
  • 举报
回复
Public Sub GetReportFileName(strName As Variant, intNum As Variant)根本没有必要

可以的传递参数upupupuop正确

freeasfish 2001-10-17
  • 打赏
  • 举报
回复
多谢各位
看程序员大本营web版有解答.
自动化接口未IDISPATCH,其中采用INVOKE方法传递参数,每一个参数为Variant类型.
只要把vb activex dll中的形参该为
Public Sub GetReportFileName(strName As Variant, intNum As Variant)

idohim 2001-10-16
  • 打赏
  • 举报
回复
肯定可以
还是你调用vb时,有什么地方不对.
lczddd 2001-10-16
  • 打赏
  • 举报
回复
我认为传给它实参的基地址就行了吧,呵呵,帮你up一下

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧