菜鸟问题:asp中调用DLL返回的数组问题
dll中:
'CLASS1
Public Function MyArray()
Dim Arry1(4) As String
Arry1(0) = "aaa"
Arry1(1) = "bbb"
Arry1(2) = "ccc"
Arry1(3) = "ddd"
Arry1(4) = "eee"
MyArray = Arry1
End Function
asp调用:
set obj=.....
Arr1=obj.MyArray
response.write "size="&lbound(Arr1)&"<br>" //输出4
response.write "Arr1="&Arr1(2)&"<br>" //出错 类型不匹配: 'Arr1'
问:
1、我的用法有问题么?若有问题,如何修改?
2、我想在DLL中返回一数组,页面中再读取。dll和页面应该怎么写呢?如果是返回集合又怎么写?
[解决办法]
Variant